Skip to content

Commit 89dd9ce

Browse files
Dan Carpentermartinkpetersen
authored andcommitted
scsi: cxlflash: Remove an unnecessary NULL check
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 <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 4919b33 commit 89dd9ce

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

drivers/scsi/cxlflash/main.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ static void process_cmd_err(struct afu_cmd *cmd, struct scsi_cmnd *scp)
4747
struct sisl_ioasa *ioasa;
4848
u32 resid;
4949

50-
if (unlikely(!cmd))
51-
return;
52-
5350
ioasa = &(cmd->sa);
5451

5552
if (ioasa->rc.flags & SISL_RC_FLAGS_UNDERRUN) {

0 commit comments

Comments
 (0)