Commit 8dd1029
scsi: hisi_sas: Check before using pointer variables
In commit 4b329ab ("scsi: hisi_sas: Move slot variable definition in
hisi_sas_abort_task()"), we move the variables slot to the function head.
However, the variable slot may be NULL, we should check it in each branch.
Fixes: 4b329ab ("scsi: hisi_sas: Move slot variable definition in hisi_sas_abort_task()")
Signed-off-by: Yihang Li <liyihang9@huawei.com>
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Link: https://lore.kernel.org/r/1702525516-51258-4-git-send-email-chenxiang66@hisilicon.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>1 parent d34ee53 commit 8dd1029
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1641 | 1641 | | |
1642 | 1642 | | |
1643 | 1643 | | |
1644 | | - | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
1645 | 1648 | | |
1646 | 1649 | | |
1647 | 1650 | | |
| |||
1688 | 1691 | | |
1689 | 1692 | | |
1690 | 1693 | | |
1691 | | - | |
| 1694 | + | |
1692 | 1695 | | |
1693 | 1696 | | |
1694 | 1697 | | |
| |||
0 commit comments