mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
scsi: scsi_debug: Drop scsi_debug_abort() NULL pointer checks
The SCSI cmnd pointer arg would never be NULL, so drop the check. In addition, its SCSI device pointer would never be NULL. The only caller is scsi_send_eh_cmnd() -> scsi_abort_eh_cmnd() -> scsi_try_to_abort_cmd() -> scsi_try_to_abort_cmd(), and in the origin of that chain those pointers cannot be NULL. Signed-off-by: John Garry <john.g.garry@oracle.com> Acked-by: Douglas Gilbert <dgilbert@interlog.com> Link: https://lore.kernel.org/r/20230313093114.1498305-4-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
d280a4ef22
commit
06be9fbebb
1 changed files with 7 additions and 7 deletions
|
@ -5360,13 +5360,13 @@ static int scsi_debug_abort(struct scsi_cmnd *SCpnt)
|
||||||
bool ok;
|
bool ok;
|
||||||
|
|
||||||
++num_aborts;
|
++num_aborts;
|
||||||
if (SCpnt) {
|
|
||||||
ok = stop_queued_cmnd(SCpnt);
|
ok = stop_queued_cmnd(SCpnt);
|
||||||
if (SCpnt->device && (SDEBUG_OPT_ALL_NOISE & sdebug_opts))
|
if (SDEBUG_OPT_ALL_NOISE & sdebug_opts)
|
||||||
sdev_printk(KERN_INFO, SCpnt->device,
|
sdev_printk(KERN_INFO, SCpnt->device,
|
||||||
"%s: command%s found\n", __func__,
|
"%s: command%s found\n", __func__,
|
||||||
ok ? "" : " not");
|
ok ? "" : " not");
|
||||||
}
|
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue