From: Julia Lawall <julia.lawall@inria.fr>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: kbuild-all@lists.01.org, Sam Ravnborg <sam@ravnborg.org>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@linux.ie>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [PATCH] drm: fix ifnullfree.cocci warnings
Date: Fri, 27 Mar 2020 09:11:44 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.21.2003270908410.2709@hadrien> (raw)
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@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.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);
+ }
}
/**
next reply other threads:[~2020-03-27 8:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-27 8:11 Julia Lawall [this message]
2020-03-31 7:47 ` Daniel Vetter
2020-03-31 11:43 ` Julia Lawall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.21.2003270908410.2709@hadrien \
--to=julia.lawall@inria.fr \
--cc=airlied@linux.ie \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=sam@ravnborg.org \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®