diff options
| author | Zhihao Cheng <chengzhihao1@huawei.com> | 2020-11-24 09:08:13 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-12-30 11:25:56 +0100 |
| commit | 6a76b1da25be1985970573c3ec7c06dca79b5a12 (patch) | |
| tree | d6fa7b930a311f78b06a650be8f33568869788eb | |
| parent | b62e01be3e95871f15e0a22244d44f82c69c48dc (diff) | |
dmaengine: mv_xor_v2: Fix error return code in mv_xor_v2_probe()
[ Upstream commit c95e6515a8c065862361f7e0e452978ade7f94ec ]
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>
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>
| -rw-r--r-- | drivers/dma/mv_xor_v2.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/dma/mv_xor_v2.c b/drivers/dma/mv_xor_v2.c index 8dc0aa4d73ab..462adf7e4e95 100644 --- a/drivers/dma/mv_xor_v2.c +++ b/drivers/dma/mv_xor_v2.c @@ -777,8 +777,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, |
