From de232af6703ff8e283559016c14a3273ea932878 Mon Sep 17 00:00:00 2001 From: Tomas Winkler Date: Tue, 28 Jul 2015 16:54:22 +0300 Subject: [PATCH] scsi_debug: vfree is null safe so drop the check Signed-off-by: Tomas Winkler Acked-by: Douglas Gilbert Reviewed-by: Martin K. Petersen Signed-off-by: James Bottomley --- 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 bbe04dae040c..e2c509e39765 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -4955,10 +4955,8 @@ static int __init scsi_debug_init(void) 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); } -- 2.45.2