vfree() does it's own 'NULL' check,so no need for check before calling it. Signed-off-by: Figo.zhang <figo1802@xxxxxxxxx> --- drivers/scsi/scsi_debug.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 213123b..c24af62 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -2976,8 +2976,7 @@ bus_unreg: dev_unreg: device_unregister(&pseudo_primary); free_vm: - if (dif_storep) - vfree(dif_storep); + vfree(dif_storep); vfree(fake_storep); return ret; @@ -2995,8 +2994,7 @@ static void __exit scsi_debug_exit(void) bus_unregister(&pseudo_lld_bus); device_unregister(&pseudo_primary); - if (dif_storep) - vfree(dif_storep); + vfree(dif_storep); vfree(fake_storep); } -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html