Skip to content

Commit e9870cd

Browse files
Wei Yongjungregkh
authored andcommitted
net: axienet: Fix error return code in axienet_probe()
[ Upstream commit eb34e98 ] In the DMA memory resource get failed case, the error is not set and 0 will be returned. Fix it by removing redundant check since devm_ioremap_resource() will handle it. Fixes: 28ef9eb ("net: axienet: make use of axistream-connected attribute optional") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent e9a6f09 commit e9870cd

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

drivers/net/ethernet/xilinx/xilinx_axienet_main.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1790,10 +1790,6 @@ static int axienet_probe(struct platform_device *pdev)
17901790
/* Check for these resources directly on the Ethernet node. */
17911791
struct resource *res = platform_get_resource(pdev,
17921792
IORESOURCE_MEM, 1);
1793-
if (!res) {
1794-
dev_err(&pdev->dev, "unable to get DMA memory resource\n");
1795-
goto free_netdev;
1796-
}
17971793
lp->dma_regs = devm_ioremap_resource(&pdev->dev, res);
17981794
lp->rx_irq = platform_get_irq(pdev, 1);
17991795
lp->tx_irq = platform_get_irq(pdev, 0);

0 commit comments

Comments
 (0)