[PATCH net-next] net: sfp: add error checking with sfp_irq_name

Subsystems: ethernet phy library, networking drivers, sff/sfp/sfp+ module support, the rest

STALE2234d

2 messages, 2 authors, 2020-07-07 · open the first message on its own page

[PATCH net-next] net: sfp: add error checking with sfp_irq_name

From: Chris Healy <hidden>
Date: 2020-07-07 20:32:55

Add error checking with sfp_irq_name before use.

Signed-off-by: Chris Healy <redacted>
---
 drivers/net/phy/sfp.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c
index 7bdfcde98266..eef458ab0e5b 100644
--- 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 |
-- 
2.21.3

Re: [PATCH net-next] net: sfp: add error checking with sfp_irq_name

From: David Miller <davem@davemloft.net>
Date: 2020-07-07 22:51:30

From: Chris Healy <redacted>
Date: Tue,  7 Jul 2020 13:32:05 -0700
Add error checking with sfp_irq_name before use.

Signed-off-by: Chris Healy <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help