mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 22:54:05 +08:00
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 <dan.carpenter@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
4919b33b63
commit
89dd9ce784
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user