Skip to content
Commit 96216181 authored by YueHaibing's avatar YueHaibing Committed by Jakub Kicinski
Browse files

sfp: Fix error handing in sfp_probe()

gpiod_to_irq() never return 0, but returns negative in
case of error, check it and set gpio_irq to 0.

Fixes: 73970055

 ("sfp: add SFP module support")
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20201031031053.25264-1-yuehaibing@huawei.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 1d850493
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment