projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
964201d
)
net: sfp: add error checking with sfp_irq_name
author
Chris Healy
<cphealy@gmail.com>
Tue, 7 Jul 2020 20:32:05 +0000
(13:32 -0700)
committer
David S. Miller
<davem@davemloft.net>
Tue, 7 Jul 2020 22:51:08 +0000
(15:51 -0700)
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>
drivers/net/phy/sfp.c
patch
|
blob
|
history
diff --git
a/drivers/net/phy/sfp.c
b/drivers/net/phy/sfp.c
index
7bdfcde
..
eef458a
100644
(file)
--- a/
drivers/net/phy/sfp.c
+++ b/
drivers/net/phy/sfp.c
@@
-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 |