]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
scsi: pm8001: Drop !task check in pm8001_abort_task()
authorJohn Garry <john.garry@huawei.com>
Wed, 26 Oct 2022 10:56:04 +0000 (18:56 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 27 Oct 2022 02:22:59 +0000 (02:22 +0000)
commit4481bdc677c1aa9b0138ee9234c8c2d14142b42e
tree9c670682641c2db2919c71503ce81a8e212854a8
parent9d266e792b0fb4c25448dc240a808667e0932ef2
scsi: pm8001: Drop !task check in pm8001_abort_task()

In commit 0b639decf651 ("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: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Link: https://lore.kernel.org/r/1666781764-123090-1-git-send-email-john.garry@huawei.com
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Acked-by: Jack Wang <jinpu.wang@ionos.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/pm8001/pm8001_sas.c