Commit c5a7eecd authored by Nam Cao's avatar Nam Cao Committed by Greg Kroah-Hartman
Browse files

Revert "staging: r8712u: Tracking kmemleak false positives."



This reverts commit 5d3da4a2.

This commit annotated false positive for kmemleak. The reasoning is that
the buffers are freed when the driver is unloaded. However, there is
actually potential memory leak when probe fails.

Tested-by: default avatarPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: default avatarNam Cao <namcaov@gmail.com>
Link: https://lore.kernel.org/r/26ce206b2c40c7db48c146aa6105789db9dfcc1a.1666688642.git.namcaov@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dbc97f83
Loading
Loading
Loading
Loading
+0 −3
Original line number Original line Diff line number Diff line
@@ -17,9 +17,7 @@
#define _RTL871X_RECV_C_
#define _RTL871X_RECV_C_


#include <linux/ip.h>
#include <linux/ip.h>
#include <linux/slab.h>
#include <linux/if_ether.h>
#include <linux/if_ether.h>
#include <linux/kmemleak.h>
#include <linux/etherdevice.h>
#include <linux/etherdevice.h>
#include <linux/ieee80211.h>
#include <linux/ieee80211.h>
#include <net/cfg80211.h>
#include <net/cfg80211.h>
@@ -61,7 +59,6 @@ void _r8712_init_recv_priv(struct recv_priv *precvpriv,
				GFP_ATOMIC);
				GFP_ATOMIC);
	if (!precvpriv->pallocated_frame_buf)
	if (!precvpriv->pallocated_frame_buf)
		return;
		return;
	kmemleak_not_leak(precvpriv->pallocated_frame_buf);
	precvpriv->precv_frame_buf = precvpriv->pallocated_frame_buf +
	precvpriv->precv_frame_buf = precvpriv->pallocated_frame_buf +
				    RXFRAME_ALIGN_SZ -
				    RXFRAME_ALIGN_SZ -
				    ((addr_t)(precvpriv->pallocated_frame_buf) &
				    ((addr_t)(precvpriv->pallocated_frame_buf) &