From: Douglas Gilbert <dgilbert@interlog.com>
To: Tomas Winkler <tomas.winkler@intel.com>,
"James E.J. Bottomley\"" <JBottomley@parallels.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH 3/4] scsi_debug: vfree is null safe so drop the check
Date: Mon, 23 Feb 2015 13:23:18 -0500 [thread overview]
Message-ID: <54EB7016.7000203@interlog.com> (raw)
In-Reply-To: <1424298699-2581-4-git-send-email-tomas.winkler@intel.com>
On 15-02-18 05:31 PM, Tomas Winkler wrote:
> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
James and Christoph,
Please ignore this patch. I have just acked a more comprehensive
patch on this code from SF Markus Elfring.
Doug Gilbert
> ---
> drivers/scsi/scsi_debug.c | 10 +++-------
> 1 file changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
> index 11774cd1741a..80410f9588ba 100644
> --- a/drivers/scsi/scsi_debug.c
> +++ b/drivers/scsi/scsi_debug.c
> @@ -4959,10 +4959,8 @@ bus_unreg:
> dev_unreg:
> root_device_unregister(pseudo_primary);
> free_vm:
> - if (map_storep)
> - vfree(map_storep);
> - if (dif_storep)
> - vfree(dif_storep);
> + vfree(map_storep);
> + vfree(dif_storep);
> vfree(fake_storep);
>
> return ret;
> @@ -4980,9 +4978,7 @@ static void __exit scsi_debug_exit(void)
> bus_unregister(&pseudo_lld_bus);
> root_device_unregister(pseudo_primary);
>
> - if (dif_storep)
> - vfree(dif_storep);
> -
> + vfree(dif_storep);
> vfree(fake_storep);
> }
>
>
next prev parent reply other threads:[~2015-02-23 18:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-18 22:31 [PATCH 0/4] scsi_debug cleanup Tomas Winkler
2015-02-18 22:31 ` [PATCH 1/4] scsi_debug: define pr_fmt() for consistent logging Tomas Winkler
2015-02-23 18:19 ` Douglas Gilbert
2015-02-18 22:31 ` [PATCH 2/4] scsi_debug: use SCSI_W_LUN_REPORT_LUNS instead of SAM2_WLUN_REPORT_LUNS; Tomas Winkler
2015-02-23 18:20 ` Douglas Gilbert
2015-02-18 22:31 ` [PATCH 3/4] scsi_debug: vfree is null safe so drop the check Tomas Winkler
2015-02-23 18:23 ` Douglas Gilbert [this message]
2015-02-18 22:31 ` [PATCH 4/4] scsi_debug: make dump_sector static Tomas Winkler
2015-02-23 18:23 ` Douglas Gilbert
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=54EB7016.7000203@interlog.com \
--to=dgilbert@interlog.com \
--cc=JBottomley@parallels.com \
--cc=linux-scsi@vger.kernel.org \
--cc=tomas.winkler@intel.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