From: Jesper Juhl <jesper.juhl@gmail.com>
To: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Maneesh Soni <maneesh@in.ibm.com>, lkml <linux-kernel@vger.kernel.org>
Subject: [PATCH] small cleanup; remove check for NULL before kfree() in driver core
Date: Wed, 17 Aug 2005 22:06:34 +0200 [thread overview]
Message-ID: <200508172206.34913.jesper.juhl@gmail.com> (raw)
Remove needless checking of variable for NULL before calling kfree() on it.
Applies to 2.6.13-rc6-git9
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---
drivers/base/class.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
--- linux-2.6.13-rc6-git9-orig/drivers/base/class.c 2005-08-17 21:53:53.000000000 +0200
+++ linux-2.6.13-rc6-git9/drivers/base/class.c 2005-08-17 21:57:26.000000000 +0200
@@ -299,10 +299,8 @@ static void class_dev_release(struct kob
pr_debug("device class '%s': release.\n", cd->class_id);
- if (cd->devt_attr) {
- kfree(cd->devt_attr);
- cd->devt_attr = NULL;
- }
+ kfree(cd->devt_attr);
+ cd->devt_attr = NULL;
if (cls->release)
cls->release(cd);
reply other threads:[~2005-08-17 20:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200508172206.34913.jesper.juhl@gmail.com \
--to=jesper.juhl@gmail.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=maneesh@in.ibm.com \
/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®