* [PATCH] scsi: g_NCR5380: Use !x in place of NULL comparisons
@ 2019-07-11 23:55 Keyur Patel
0 siblings, 0 replies; only message in thread
From: Keyur Patel @ 2019-07-11 23:55 UTC (permalink / raw)
Cc: iamkeyur96, Finn Thain, Michael Schmitz, James E.J. Bottomley,
Martin K. Petersen, linux-scsi, linux-kernel
Change (x == NULL) to !x and (x != NULL) to x, to fix
following checkpatch.pl warnings:
CHECK: Comparison to NULL could be written "!x".
Signed-off-by: Keyur Patel <iamkeyur96@gmail.com>
---
drivers/scsi/g_NCR5380.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c
index 2ab774e62e40..6813094155d3 100644
--- a/drivers/scsi/g_NCR5380.c
+++ b/drivers/scsi/g_NCR5380.c
@@ -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;
}
--
2.22.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-07-11 23:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-11 23:55 [PATCH] scsi: g_NCR5380: Use !x in place of NULL comparisons Keyur Patel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox