Commit de232af6 authored by Tomas Winkler's avatar Tomas Winkler Committed by James Bottomley

scsi_debug: vfree is null safe so drop the check

Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Acked-by: default avatarDouglas Gilbert <dgilbert@interlog.com>
Reviewed-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Odin.com>
parent 34d55434
...@@ -4955,10 +4955,8 @@ static int __init scsi_debug_init(void) ...@@ -4955,10 +4955,8 @@ static int __init scsi_debug_init(void)
dev_unreg: dev_unreg:
root_device_unregister(pseudo_primary); root_device_unregister(pseudo_primary);
free_vm: free_vm:
if (map_storep) vfree(map_storep);
vfree(map_storep); vfree(dif_storep);
if (dif_storep)
vfree(dif_storep);
vfree(fake_storep); vfree(fake_storep);
return ret; return ret;
...@@ -4976,9 +4974,7 @@ static void __exit scsi_debug_exit(void) ...@@ -4976,9 +4974,7 @@ static void __exit scsi_debug_exit(void)
bus_unregister(&pseudo_lld_bus); bus_unregister(&pseudo_lld_bus);
root_device_unregister(pseudo_primary); root_device_unregister(pseudo_primary);
if (dif_storep) vfree(dif_storep);
vfree(dif_storep);
vfree(fake_storep); vfree(fake_storep);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment