From: Larry Finger Date: Sat, 3 Sep 2011 19:14:23 +0000 (+0800) Subject: staging: r8712u: Tracking kmemleak false positives. X-Git-Tag: next-20111004~7^2~305 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5d3da4a20a271e3cf5496a50cbb8118aa019374f;p=karo-tx-linux.git staging: r8712u: Tracking kmemleak false positives. The frame buffers allocated in _r8712_init_recv_priv() are not tracked by kmemleak, but they are freed when the driver is unloaded. To help find any real leaks, these false positives are annotated for kmemleak. Signed-off-by: Larry Finger Signed-off-by: Ali Bahar Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8712/rtl871x_recv.c b/drivers/staging/rtl8712/rtl871x_recv.c index aec83dd8a01f..7069f06d9b5d 100644 --- a/drivers/staging/rtl8712/rtl871x_recv.c +++ b/drivers/staging/rtl8712/rtl871x_recv.c @@ -28,6 +28,9 @@ #define _RTL871X_RECV_C_ +#include +#include + #include "osdep_service.h" #include "drv_types.h" #include "recv_osdep.h" @@ -73,6 +76,7 @@ sint _r8712_init_recv_priv(struct recv_priv *precvpriv, RXFRAME_ALIGN_SZ); if (precvpriv->pallocated_frame_buf == NULL) return _FAIL; + kmemleak_not_leak(precvpriv->pallocated_frame_buf); memset(precvpriv->pallocated_frame_buf, 0, NR_RECVFRAME * sizeof(union recv_frame) + RXFRAME_ALIGN_SZ); precvpriv->precv_frame_buf = precvpriv->pallocated_frame_buf +