From: Dan Carpenter Date: Fri, 5 Jun 2020 11:02:58 +0000 (+0300) Subject: scsi: cxlflash: Remove an unnecessary NULL check X-Git-Tag: v5.15~3566^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=89dd9ce784fb64e732676b7958a0278750304567;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c index fcc5aa9..94250eb 100644 --- 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) {