You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
drivers: net: smc911x: Check for error irq
[ Upstream commitcb93b3e11d] Because platform_get_irq() could fail and return error irq. Therefore, it might be better to check it if order to avoid the use of error irq. Fixes:ae150435b5("smsc: Move the SMC (SMSC) drivers") Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ca2a15053b
commit
9db0f8d395
@@ -2069,6 +2069,11 @@ static int smc911x_drv_probe(struct platform_device *pdev)
|
||||
|
||||
ndev->dma = (unsigned char)-1;
|
||||
ndev->irq = platform_get_irq(pdev, 0);
|
||||
if (ndev->irq < 0) {
|
||||
ret = ndev->irq;
|
||||
goto release_both;
|
||||
}
|
||||
|
||||
lp = netdev_priv(ndev);
|
||||
lp->netdev = ndev;
|
||||
#ifdef SMC_DYNAMIC_BUS_CONFIG
|
||||
|
||||
Reference in New Issue
Block a user