You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
net: ks8851: Check for error irq
[ Upstream commit99d7fbb5ce] 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:797047f875("net: ks8851: Implement Parallel bus operations") 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
9db0f8d395
commit
75c962f02a
@@ -323,6 +323,8 @@ static int ks8851_probe_par(struct platform_device *pdev)
|
||||
return ret;
|
||||
|
||||
netdev->irq = platform_get_irq(pdev, 0);
|
||||
if (netdev->irq < 0)
|
||||
return netdev->irq;
|
||||
|
||||
return ks8851_probe_common(netdev, dev, msg_enable);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user