aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2015-07-28 09:54:22 -0400
committerJames Bottomley <JBottomley@Odin.com>2015-09-06 14:00:16 -0400
commitde232af6703ff8e283559016c14a3273ea932878 (patch)
treeb8d5b8537ad4eaef94240cca11d2c69fa51a1556 /drivers/scsi
parent34d55434ba1f39093ea30cb770d70508fdb1edaa (diff)
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>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/scsi_debug.c10
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:
4955dev_unreg: 4955dev_unreg:
4956 root_device_unregister(pseudo_primary); 4956 root_device_unregister(pseudo_primary);
4957free_vm: 4957free_vm:
4958 if (map_storep) 4958 vfree(map_storep);
4959 vfree(map_storep); 4959 vfree(dif_storep);
4960 if (dif_storep)
4961 vfree(dif_storep);
4962 vfree(fake_storep); 4960 vfree(fake_storep);
4963 4961
4964 return ret; 4962 return ret;
@@ -4976,9 +4974,7 @@ static void __exit scsi_debug_exit(void)
4976 bus_unregister(&pseudo_lld_bus); 4974 bus_unregister(&pseudo_lld_bus);
4977 root_device_unregister(pseudo_primary); 4975 root_device_unregister(pseudo_primary);
4978 4976
4979 if (dif_storep) 4977 vfree(dif_storep);
4980 vfree(dif_storep);
4981
4982 vfree(fake_storep); 4978 vfree(fake_storep);
4983} 4979}
4984 4980