projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4919b33
)
scsi: cxlflash: Remove an unnecessary NULL check
author
Dan Carpenter
<dan.carpenter@oracle.com>
Fri, 5 Jun 2020 11:02:58 +0000
(14:02 +0300)
committer
Martin K. Petersen
<martin.petersen@oracle.com>
Wed, 10 Jun 2020 01:57:27 +0000
(21:57 -0400)
The "cmd" pointer was already dereferenced a couple lines earlier so this
NULL check is too late. Fortunately, the pointer can never be NULL and the
check can be removed.
Link:
https://lore.kernel.org/r/20200605110258.GD978434@mwanda
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/cxlflash/main.c
patch
|
blob
|
history
diff --git
a/drivers/scsi/cxlflash/main.c
b/drivers/scsi/cxlflash/main.c
index fcc5aa9f601472dacf1126e52950336ad5cb5263..94250ebe9e803cd66cabb511a066ad123e273ce8 100644
(file)
--- a/
drivers/scsi/cxlflash/main.c
+++ b/
drivers/scsi/cxlflash/main.c
@@
-47,9
+47,6
@@
static void process_cmd_err(struct afu_cmd *cmd, struct scsi_cmnd *scp)
struct sisl_ioasa *ioasa;
u32 resid;
- if (unlikely(!cmd))
- return;
-
ioasa = &(cmd->sa);
if (ioasa->rc.flags & SISL_RC_FLAGS_UNDERRUN) {