]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: axienet: add missing error return code in axienet_probe()
authorYang Yingliang <yangyingliang@huawei.com>
Thu, 16 Jun 2022 06:29:17 +0000 (14:29 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 16 Jun 2022 18:08:38 +0000 (11:08 -0700)
It should return error code in error path in axienet_probe().

Fixes: 0909279f6be4 ("net: axienet: make the 64b addresable DMA depends on 64b archectures")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220616062917.3601-1-yangyingliang@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/xilinx/xilinx_axienet_main.c

index fa7bcd2c1892848d2d650faada771193eee63550..1760930ec0c49ddaf95bcb72fbc0046ba46badcf 100644 (file)
@@ -2039,6 +2039,7 @@ static int axienet_probe(struct platform_device *pdev)
        }
        if (!IS_ENABLED(CONFIG_64BIT) && lp->features & XAE_FEATURE_DMA_64BIT) {
                dev_err(&pdev->dev, "64-bit addressable DMA is not compatible with 32-bit archecture\n");
+               ret = -EINVAL;
                goto cleanup_clk;
        }