Skip to contentSkip to conversation

scsi_debug:c: fix call vfree()

PATCH New Figo.zhang 1 participant 1 message Jun 7, 2009 SCSI

lore
Share & tools
lore

Figo.zhang

author
#0 lore raw

PATCH 1/1 scsi_debug:c: fix call vfree()

vfree() does it's own 'NULL' check,so no need for check before calling it.

---
drivers/scsi/scsi_debug.c | 6 ++----

 1 files changed, 2 insertions(+), 4 deletions(-)
drivers/scsi/scsi_debug.c +2 -4
index 213123b..c24af62 100644
@@ -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);
 }