Commit 8cb601f1 authored by Chris Healy's avatar Chris Healy Committed by David S. Miller

net: sfp: add error checking with sfp_irq_name

Add error checking with sfp_irq_name before use.
Signed-off-by: default avatarChris Healy <cphealy@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 964201de
...@@ -2354,6 +2354,9 @@ static int sfp_probe(struct platform_device *pdev) ...@@ -2354,6 +2354,9 @@ static int sfp_probe(struct platform_device *pdev)
"%s-%s", dev_name(sfp->dev), "%s-%s", dev_name(sfp->dev),
gpio_of_names[i]); gpio_of_names[i]);
if (!sfp_irq_name)
return -ENOMEM;
err = devm_request_threaded_irq(sfp->dev, sfp->gpio_irq[i], err = devm_request_threaded_irq(sfp->dev, sfp->gpio_irq[i],
NULL, sfp_irq, NULL, sfp_irq,
IRQF_ONESHOT | IRQF_ONESHOT |
......
Markdown is supported
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