mirror of
https://github.com/hardkernel/linux.git
synced 2026-04-01 10:42:58 +09:00
fjes: Check for error irq
[ Upstream commitdb6d6afe38] I find that platform_get_irq() will not always succeed. It will return error irq in case of the failure. Therefore, it might be better to check it if order to avoid the use of error irq. Fixes:658d439b22("fjes: Introduce FUJITSU Extended Socket Network Device driver") 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
4e4591490f
commit
dddc12cba9
@@ -1284,6 +1284,11 @@ static int fjes_probe(struct platform_device *plat_dev)
|
||||
hw->hw_res.start = res->start;
|
||||
hw->hw_res.size = resource_size(res);
|
||||
hw->hw_res.irq = platform_get_irq(plat_dev, 0);
|
||||
if (hw->hw_res.irq < 0) {
|
||||
err = hw->hw_res.irq;
|
||||
goto err_free_control_wq;
|
||||
}
|
||||
|
||||
err = fjes_hw_init(&adapter->hw);
|
||||
if (err)
|
||||
goto err_free_control_wq;
|
||||
|
||||
Reference in New Issue
Block a user