* [PATCH] dmaengine: mv_xor_v2: Fix error return code in mv_xor_v2_probe()
@ 2020-11-24 1:08 Zhihao Cheng
2020-11-24 17:26 ` Vinod Koul
0 siblings, 1 reply; 2+ messages in thread
From: Zhihao Cheng @ 2020-11-24 1:08 UTC (permalink / raw)
To: vkoul, thomas.petazzoni; +Cc: dmaengine, linux-kernel, chengzhihao1, yi.zhang
Return the corresponding error code when first_msi_entry() returns
NULL in mv_xor_v2_probe().
Fixes: 19a340b1a820430 ("dmaengine: mv_xor_v2: new driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
---
drivers/dma/mv_xor_v2.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/dma/mv_xor_v2.c b/drivers/dma/mv_xor_v2.c
index 2753a6b916f6..9b0d463f89bb 100644
--- a/drivers/dma/mv_xor_v2.c
+++ b/drivers/dma/mv_xor_v2.c
@@ -771,8 +771,10 @@ static int mv_xor_v2_probe(struct platform_device *pdev)
goto disable_clk;
msi_desc = first_msi_entry(&pdev->dev);
- if (!msi_desc)
+ if (!msi_desc) {
+ ret = -ENODEV;
goto free_msi_irqs;
+ }
xor_dev->msi_desc = msi_desc;
ret = devm_request_irq(&pdev->dev, msi_desc->irq,
--
2.25.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] dmaengine: mv_xor_v2: Fix error return code in mv_xor_v2_probe()
2020-11-24 1:08 [PATCH] dmaengine: mv_xor_v2: Fix error return code in mv_xor_v2_probe() Zhihao Cheng
@ 2020-11-24 17:26 ` Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2020-11-24 17:26 UTC (permalink / raw)
To: Zhihao Cheng; +Cc: thomas.petazzoni, dmaengine, linux-kernel, yi.zhang
On 24-11-20, 09:08, Zhihao Cheng wrote:
> Return the corresponding error code when first_msi_entry() returns
> NULL in mv_xor_v2_probe().
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-24 17:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-24 1:08 [PATCH] dmaengine: mv_xor_v2: Fix error return code in mv_xor_v2_probe() Zhihao Cheng
2020-11-24 17:26 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox