Skip to content

Commit 06d1a90

Browse files
void0redmartinkpetersen
authored andcommitted
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/[email protected] Signed-off-by: Kang Chen <[email protected]> Acked-by: Xiang Chen <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 877b037 commit 06d1a90

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/scsi/hisi_sas/hisi_sas_v3_hw.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2495,8 +2495,7 @@ static int interrupt_preinit_v3_hw(struct hisi_hba *hisi_hba)
24952495
hisi_hba->cq_nvecs = vectors - BASE_VECTORS_V3_HW;
24962496
shost->nr_hw_queues = hisi_hba->cq_nvecs;
24972497

2498-
devm_add_action(&pdev->dev, hisi_sas_v3_free_vectors, pdev);
2499-
return 0;
2498+
return devm_add_action(&pdev->dev, hisi_sas_v3_free_vectors, pdev);
25002499
}
25012500

25022501
static int interrupt_init_v3_hw(struct hisi_hba *hisi_hba)

0 commit comments

Comments
 (0)