diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2015-07-28 15:54:22 +0200 |
---|---|---|
committer | James Bottomley <JBottomley@Odin.com> | 2015-09-06 20:00:16 +0200 |
commit | de232af6703ff8e283559016c14a3273ea932878 (patch) | |
tree | b8d5b8537ad4eaef94240cca11d2c69fa51a1556 | |
parent | scsi_debug: use SCSI_W_LUN_REPORT_LUNS instead of SAM2_WLUN_REPORT_LUNS; (diff) | |
download | linux-de232af6703ff8e283559016c14a3273ea932878.tar.xz linux-de232af6703ff8e283559016c14a3273ea932878.zip |
scsi_debug: vfree is null safe so drop the check
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
-rw-r--r-- | drivers/scsi/scsi_debug.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index bbe04dae040c..e2c509e39765 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -4955,10 +4955,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; @@ -4976,9 +4974,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); } |