Skip to content

Commit

Permalink
dmaengine: mv_xor_v2: Fix error return code in mv_xor_v2_probe()
Browse files Browse the repository at this point in the history
[ Upstream commit c95e651 ]

Return the corresponding error code when first_msi_entry() returns
NULL in mv_xor_v2_probe().

Fixes: 19a340b ("dmaengine: mv_xor_v2: new driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Link: https://lore.kernel.org/r/20201124010813.1939095-1-chengzhihao1@huawei.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Zhihao Cheng authored and gregkh committed Dec 30, 2020
1 parent 0dee7fa commit 17fdb0e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/dma/mv_xor_v2.c
Expand Up @@ -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,
Expand Down

0 comments on commit 17fdb0e

Please sign in to comment.