mirror of
https://github.com/torvalds/linux.git
synced 2024-11-19 02:21:47 +00:00
net: sfp: add error checking with sfp_irq_name
Add error checking with sfp_irq_name before use. Signed-off-by: Chris Healy <cphealy@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
964201de69
commit
8cb601f158
@ -2354,6 +2354,9 @@ static int sfp_probe(struct platform_device *pdev)
|
||||
"%s-%s", dev_name(sfp->dev),
|
||||
gpio_of_names[i]);
|
||||
|
||||
if (!sfp_irq_name)
|
||||
return -ENOMEM;
|
||||
|
||||
err = devm_request_threaded_irq(sfp->dev, sfp->gpio_irq[i],
|
||||
NULL, sfp_irq,
|
||||
IRQF_ONESHOT |
|
||||
|
Loading…
Reference in New Issue
Block a user