From: Larry Finger Date: Sat, 4 Jun 2016 01:17:37 +0000 (-0500) Subject: staging: r8712u: Handle some false positives from kmemleak X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=580b4105530796b63bbbf6a093678c60144275e9;p=deliverable%2Flinux.git staging: r8712u: Handle some false positives from kmemleak When this driver preallocates some URBs, kmemleak is unable to find that allocated memory when it scans. When the driver is unloaded, that memory is reclaimed, therefore, the report is a false positive. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8712/xmit_linux.c b/drivers/staging/rtl8712/xmit_linux.c index 1e86133cada1..4ee4136b5c28 100644 --- a/drivers/staging/rtl8712/xmit_linux.c +++ b/drivers/staging/rtl8712/xmit_linux.c @@ -31,6 +31,7 @@ #include #include #include +#include #include "osdep_service.h" #include "drv_types.h" @@ -133,6 +134,7 @@ int r8712_xmit_resource_alloc(struct _adapter *padapter, netdev_err(padapter->pnetdev, "pxmitbuf->pxmit_urb[i] == NULL\n"); return _FAIL; } + kmemleak_not_leak(pxmitbuf->pxmit_urb[i]); } return _SUCCESS; }