From: Scott Kidder <scott.kidder11@gmail.com>
To: jarod@redhat.com, adraham.manu@gmail.com, davilla@4pi.com
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Scott Kidder <scott.kidder11@gmail.com>
Subject: [PATCH 2/2] Staging: crystalhd: removed kfree(NULL) checks
Date: Wed, 26 May 2010 23:38:45 -0500 [thread overview]
Message-ID: <1274935125-8825-1-git-send-email-scott.kidder11@gmail.com> (raw)
Removed kfree(NULL checks) that were not necessary
Signed-off-by: Scott Kidder <scott.kidder11@gmail.com>
---
drivers/staging/crystalhd/crystalhd_lnx.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/crystalhd/crystalhd_lnx.c b/drivers/staging/crystalhd/crystalhd_lnx.c
index a4ec891..9d2805a 100644
--- a/drivers/staging/crystalhd/crystalhd_lnx.c
+++ b/drivers/staging/crystalhd/crystalhd_lnx.c
@@ -152,10 +152,8 @@ static int chd_dec_fetch_cdata(struct crystalhd_adp *adp, struct crystalhd_ioctl
if (rc) {
BCMLOG_ERR("failed to pull add_cdata sz:%x ua_off:%x\n",
io->add_cdata_sz, (unsigned int)ua_off);
- if (io->add_cdata) {
- kfree(io->add_cdata);
- io->add_cdata = NULL;
- }
+ kfree(io->add_cdata);
+ io->add_cdata = NULL;
return -ENODATA;
}
@@ -435,8 +433,7 @@ static void __devexit chd_dec_release_chdev(struct crystalhd_adp *adp)
/* Clear iodata pool.. */
do {
temp = chd_dec_alloc_iodata(adp, 0);
- if (temp)
- kfree(temp);
+ kfree(temp);
} while (temp);
crystalhd_delete_elem_pool(adp);
--
1.7.1
reply other threads:[~2010-05-27 3:26 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=1274935125-8825-1-git-send-email-scott.kidder11@gmail.com \
--to=scott.kidder11@gmail.com \
--cc=adraham.manu@gmail.com \
--cc=davilla@4pi.com \
--cc=devel@driverdev.osuosl.org \
--cc=jarod@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/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®