From: "Figo.zhang" <figo1802@gmail.com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Douglas Gilbert <dougg@torque.net>, linux-scsi@vger.kernel.org
Subject: [PATCH]scsi_debug:c: fix call vfree()
Date: Sun, 07 Jun 2009 13:30:02 +0800 [thread overview]
Message-ID: <1244352602.3355.17.camel@myhost> (raw)
vfree() does it's own 'NULL' check,so no need for check before
calling it.
Signed-off-by: Figo.zhang <figo1802@gmail.com>
---
drivers/scsi/scsi_debug.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index 213123b..c24af62 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -2976,8 +2976,7 @@ bus_unreg:
dev_unreg:
device_unregister(&pseudo_primary);
free_vm:
- if (dif_storep)
- vfree(dif_storep);
+ vfree(dif_storep);
vfree(fake_storep);
return ret;
@@ -2995,8 +2994,7 @@ static void __exit scsi_debug_exit(void)
bus_unregister(&pseudo_lld_bus);
device_unregister(&pseudo_primary);
- if (dif_storep)
- vfree(dif_storep);
+ vfree(dif_storep);
vfree(fake_storep);
}
reply other threads:[~2009-06-07 5:30 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=1244352602.3355.17.camel@myhost \
--to=figo1802@gmail.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=dougg@torque.net \
--cc=linux-scsi@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