[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.2003270908410.2709@hadrien>
Date: Fri, 27 Mar 2020 09:11:44 +0100 (CET)
From: Julia Lawall <julia.lawall@...ia.fr>
To: Daniel Vetter <daniel.vetter@...ll.ch>
cc: kbuild-all@...ts.01.org, Sam Ravnborg <sam@...nborg.org>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...ux.ie>,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: [PATCH] drm: fix ifnullfree.cocci warnings
NULL check before kfree is not needed.
Generated by: scripts/coccinelle/free/ifnullfree.cocci
Fixes: c6603c740e0e ("drm: add managed resources tied to drm_device")
Signed-off-by: kbuild test robot <lkp@...el.com>
Signed-off-by: Julia Lawall <julia.lawall@...ia.fr>
---
tree: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
head: 9e1ed9fb1eb0a4bc43a26365c592d3095286038b
commit: c6603c740e0e3492c9c95fdab833375bf7117b6b [1587/1636] drm: add managed resources tied to drm_device
:::::: branch date: 8 hours ago
:::::: commit date: 9 hours ago
Up to you, if you tihnk it is useful...
drm_drv.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -837,8 +837,9 @@ static void drm_dev_release(struct kref
if (!dev->driver->release && !dev->managed.final_kfree) {
WARN_ON(!list_empty(&dev->managed.resources));
kfree(dev);
- } else if (dev->managed.final_kfree)
+ } else {
kfree(dev->managed.final_kfree);
+ }
}
/**
Powered by blists - more mailing lists