Skip to contentSkip to conversation

scsi: g_NCR5380: Use !x in place of NULL comparisons

PATCH New Keyur Patel 1 participant 1 message Jul 11, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: g_NCR5380: Use !x in place of NULL comparisons

Change (x == NULL) to !x and (x != NULL) to x, to fix following checkpatch.pl warnings:
CHECK: Comparison to NULL could be written "!x".

---
 drivers/scsi/g_NCR5380.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/g_NCR5380.c +1 -1
index 2ab774e62e40..6813094155d3 100644
@@ -312,7 +312,7 @@ static int generic_NCR5380_init_one(struct scsi_host_template *tpnt,
 	}
 
 	instance = scsi_host_alloc(tpnt, sizeof(struct NCR5380_hostdata));
-	if (instance == NULL) {
+	if (!instance) {
 		ret = -ENOMEM;
 		goto out_unmap;
 	}
Signature · 1 line
2.22.0