diff options
author | Kang Chen <void0red@gmail.com> | 2023-02-27 04:10:30 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2023-03-07 00:33:12 +0100 |
commit | 06d1a90de60208054cca15ef200138cfdbb642a9 (patch) | |
tree | ce6d364950adc6eba26ba434b79aa71aa76d8977 /drivers | |
parent | scsi: qla2xxx: Add option to disable FC2 Target support (diff) | |
download | linux-06d1a90de60208054cca15ef200138cfdbb642a9.tar.xz linux-06d1a90de60208054cca15ef200138cfdbb642a9.zip |
scsi: hisi_sas: Check devm_add_action() return value
In case devm_add_action() fails, check it in the caller of
interrupt_preinit_v3_hw().
Link: https://lore.kernel.org/r/20230227031030.893324-1-void0red@gmail.com
Signed-off-by: Kang Chen <void0red@gmail.com>
Acked-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c index 0c3fcb807806..a63279f55d09 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c @@ -2495,8 +2495,7 @@ static int interrupt_preinit_v3_hw(struct hisi_hba *hisi_hba) hisi_hba->cq_nvecs = vectors - BASE_VECTORS_V3_HW; shost->nr_hw_queues = hisi_hba->cq_nvecs; - devm_add_action(&pdev->dev, hisi_sas_v3_free_vectors, pdev); - return 0; + return devm_add_action(&pdev->dev, hisi_sas_v3_free_vectors, pdev); } static int interrupt_init_v3_hw(struct hisi_hba *hisi_hba) |