Commit 4481bdc6 authored by John Garry's avatar John Garry Committed by Martin K. Petersen

scsi: pm8001: Drop !task check in pm8001_abort_task()

In commit 0b639dec ("scsi: pm8001: Modify task abort handling for SATA
task"), code was introduced to dereference "task" pointer in
pm8001_abort_task(). However there was a pre-existing later check for
"!task", which spooked the kernel test robot.

Function pm8001_abort_task() should never be passed NULL for "task"
pointer, so remove that check. Also remove the "unlikely" hint, as this is
not fastpath code.
Reported-by: default avatarkernel test robot <lkp@intel.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
Link: https://lore.kernel.org/r/1666781764-123090-1-git-send-email-john.garry@huawei.comReviewed-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
Acked-by: default avatarJack Wang <jinpu.wang@ionos.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 9d266e79
...@@ -979,7 +979,7 @@ int pm8001_abort_task(struct sas_task *task) ...@@ -979,7 +979,7 @@ int pm8001_abort_task(struct sas_task *task)
u32 phy_id, port_id; u32 phy_id, port_id;
struct sas_task_slow slow_task; struct sas_task_slow slow_task;
if (unlikely(!task || !task->lldd_task || !task->dev)) if (!task->lldd_task || !task->dev)
return TMF_RESP_FUNC_FAILED; return TMF_RESP_FUNC_FAILED;
dev = task->dev; dev = task->dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment