[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160413070742.GA9311@lkp-nex05>
Date: Wed, 13 Apr 2016 15:07:42 +0800
From: kbuild test robot <fengguang.wu@...el.com>
To: Karol Herbst <nouveau@...olherbst.de>
Cc: kbuild-all@...org, linux-kernel@...r.kernel.org,
Ben Skeggs <bskeggs@...hat.com>,
Martin Peres <martin.peres@...e.fr>,
David Airlie <airlied@...ux.ie>,
dri-devel@...ts.freedesktop.org
Subject: [PATCH] drm/nouveau/iccsense: fix ifnullfree.cocci warnings
drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c:133:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values.
NULL check before some freeing functions is not needed.
Based on checkpatch warning
"kfree(NULL) is safe this check is probably not required"
and kfreeaddr.cocci by Julia Lawall.
Generated by: scripts/coccinelle/free/ifnullfree.cocci
CC: Karol Herbst <nouveau@...olherbst.de>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
---
base.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c
@@ -129,8 +129,7 @@ nvkm_iccsense_dtor(struct nvkm_subdev *s
{
struct nvkm_iccsense *iccsense = nvkm_iccsense(subdev);
- if (iccsense->rails)
- kfree(iccsense->rails);
+ kfree(iccsense->rails);
return iccsense;
}
Powered by blists - more mailing lists