提交 de232af6 编写于 作者: T Tomas Winkler 提交者: James Bottomley

scsi_debug: vfree is null safe so drop the check

Signed-off-by: NTomas Winkler <tomas.winkler@intel.com>
Acked-by: NDouglas Gilbert <dgilbert@interlog.com>
Reviewed-by: NMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
上级 34d55434
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册