Re: [PATCH 3/4] scsi_debug: vfree is null safe so drop the check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 15-02-18 05:31 PM, Tomas Winkler wrote:
Signed-off-by: Tomas Winkler <tomas.winkler@xxxxxxxxx>

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);
  }



--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux