linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: sfp: add error checking with sfp_irq_name
@ 2020-07-07 20:32 Chris Healy
  2020-07-07 22:51 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Healy @ 2020-07-07 20:32 UTC (permalink / raw)
  To: linux, andrew, f.fainelli, hkallweit1, davem, kuba, netdev, linux-kernel
  Cc: Chris Healy

Add error checking with sfp_irq_name before use.

Signed-off-by: Chris Healy <cphealy@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] net: sfp: add error checking with sfp_irq_name
  2020-07-07 20:32 [PATCH net-next] net: sfp: add error checking with sfp_irq_name Chris Healy
@ 2020-07-07 22:51 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-07-07 22:51 UTC (permalink / raw)
  To: cphealy; +Cc: linux, andrew, f.fainelli, hkallweit1, kuba, netdev, linux-kernel

From: Chris Healy <cphealy@gmail.com>
Date: Tue,  7 Jul 2020 13:32:05 -0700

> Add error checking with sfp_irq_name before use.
> 
> Signed-off-by: Chris Healy <cphealy@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-07 22:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-07 20:32 [PATCH net-next] net: sfp: add error checking with sfp_irq_name Chris Healy
2020-07-07 22:51 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).