public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] net: mctp: usb: properly drop the usb interface on probe error
@ 2026-02-23 11:33 Greg Kroah-Hartman
  2026-02-24  1:41 ` Jeremy Kerr
  2026-02-24  1:50 ` Jeremy Kerr
  0 siblings, 2 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2026-02-23 11:33 UTC (permalink / raw)
  To: netdev; +Cc: linux-kernel, Greg Kroah-Hartman, Jeremy Kerr, Matt Johnston,
	stable

When an error happens in mctp_usb_probe() the reference count on the usb
interface structure needs to be properly dropped as it was incremented
earlier in the function.

Cc: Jeremy Kerr <jk@codeconstruct.com.au>
Cc: Matt Johnston <matt@codeconstruct.com.au>
Cc: stable <stable@kernel.org>
Assisted-by: gkh_clanker_2000
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/mctp/mctp-usb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mctp/mctp-usb.c b/drivers/net/mctp/mctp-usb.c
index ef860cfc629f..eef17ae89298 100644
--- a/drivers/net/mctp/mctp-usb.c
+++ b/drivers/net/mctp/mctp-usb.c
@@ -355,6 +355,7 @@ static int mctp_usb_probe(struct usb_interface *intf,
 	usb_free_urb(dev->tx_urb);
 	usb_free_urb(dev->rx_urb);
 	free_netdev(netdev);
+	usb_put_dev(dev->usbdev);
 	return rc;
 }
 
-- 
2.53.0


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

end of thread, other threads:[~2026-02-25 14:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-23 11:33 [PATCH net] net: mctp: usb: properly drop the usb interface on probe error Greg Kroah-Hartman
2026-02-24  1:41 ` Jeremy Kerr
2026-02-24  1:50 ` Jeremy Kerr
2026-02-24  6:18   ` Greg Kroah-Hartman
2026-02-24  6:31     ` Jeremy Kerr
2026-02-25 14:35       ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox