* [PATCH] scsi: hisi_sas: add a check of devm_add_action
@ 2023-02-27 3:10 void0red
2023-03-06 3:06 ` chenxiang (M)
2023-03-07 2:57 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: void0red @ 2023-02-27 3:10 UTC (permalink / raw)
To: chenxiang66; +Cc: jejb, martin.petersen, linux-scsi, linux-kernel, Kang Chen
From: Kang Chen <void0red@gmail.com>
devm_add_action may fails, check it in the caller of
interrupt_preinit_v3_hw
Signed-off-by: Kang Chen <void0red@gmail.com>
---
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 3 +--
1 file changed, 1 insertion(+), 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 0c3fcb807..a63279f55 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)
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: hisi_sas: add a check of devm_add_action
2023-02-27 3:10 [PATCH] scsi: hisi_sas: add a check of devm_add_action void0red
@ 2023-03-06 3:06 ` chenxiang (M)
2023-03-07 2:57 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: chenxiang (M) @ 2023-03-06 3:06 UTC (permalink / raw)
To: void0red; +Cc: jejb, martin.petersen, linux-scsi, linux-kernel
Hi,
在 2023/2/27 11:10, void0red 写道:
> From: Kang Chen <void0red@gmail.com>
>
> devm_add_action may fails, check it in the caller of
> interrupt_preinit_v3_hw
>
> Signed-off-by: Kang Chen <void0red@gmail.com>
Acked-by: Xiang Chen <chenxiang66@hisilicon.com>
Thanks!
> ---
> drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 3 +--
> 1 file changed, 1 insertion(+), 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 0c3fcb807..a63279f55 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)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: hisi_sas: add a check of devm_add_action
2023-02-27 3:10 [PATCH] scsi: hisi_sas: add a check of devm_add_action void0red
2023-03-06 3:06 ` chenxiang (M)
@ 2023-03-07 2:57 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2023-03-07 2:57 UTC (permalink / raw)
To: chenxiang66, void0red; +Cc: Martin K . Petersen, jejb, linux-scsi, linux-kernel
On Mon, 27 Feb 2023 11:10:30 +0800, void0red wrote:
> devm_add_action may fails, check it in the caller of
> interrupt_preinit_v3_hw
>
>
Applied to 6.3/scsi-fixes, thanks!
[1/1] scsi: hisi_sas: add a check of devm_add_action
https://git.kernel.org/mkp/scsi/c/06d1a90de602
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-07 2:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-27 3:10 [PATCH] scsi: hisi_sas: add a check of devm_add_action void0red
2023-03-06 3:06 ` chenxiang (M)
2023-03-07 2:57 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox