public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] isdn/bas_gigaset: fix a leak on failure path in gigaset_probe()
@ 2014-07-25 22:34 Alexey Khoroshilov
  2014-07-26 10:23 ` Tilman Schmidt
  2014-07-29 19:18 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Alexey Khoroshilov @ 2014-07-25 22:34 UTC (permalink / raw)
  To: Hansjoerg Lipp, Tilman Schmidt
  Cc: Alexey Khoroshilov, Karsten Keil, gigaset307x-common, netdev,
	linux-kernel, ldv-project

There is a lack of usb_put_dev(udev) on failure path in gigaset_probe().

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
---
 drivers/isdn/gigaset/bas-gigaset.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c
index c44950d3eb7b..b7ae0a0dd5b6 100644
--- a/drivers/isdn/gigaset/bas-gigaset.c
+++ b/drivers/isdn/gigaset/bas-gigaset.c
@@ -2400,6 +2400,7 @@ allocerr:
 error:
 	freeurbs(cs);
 	usb_set_intfdata(interface, NULL);
+	usb_put_dev(udev);
 	gigaset_freecs(cs);
 	return rc;
 }
-- 
1.9.1


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

* Re: [PATCH] isdn/bas_gigaset: fix a leak on failure path in gigaset_probe()
  2014-07-25 22:34 [PATCH] isdn/bas_gigaset: fix a leak on failure path in gigaset_probe() Alexey Khoroshilov
@ 2014-07-26 10:23 ` Tilman Schmidt
  2014-07-29 19:18 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Tilman Schmidt @ 2014-07-26 10:23 UTC (permalink / raw)
  To: Alexey Khoroshilov, Hansjoerg Lipp
  Cc: Karsten Keil, gigaset307x-common, netdev, linux-kernel,
	ldv-project

Am 26.07.2014 00:34, schrieb Alexey Khoroshilov:
> There is a lack of usb_put_dev(udev) on failure path in gigaset_probe().

You're right. Good catch.

> Found by Linux Driver Verification project (linuxtesting.org).
> 
> Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>

Acked-by: Tilman Schmidt <tilman@imap.cc>

> ---
>  drivers/isdn/gigaset/bas-gigaset.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c
> index c44950d3eb7b..b7ae0a0dd5b6 100644
> --- a/drivers/isdn/gigaset/bas-gigaset.c
> +++ b/drivers/isdn/gigaset/bas-gigaset.c
> @@ -2400,6 +2400,7 @@ allocerr:
>  error:
>  	freeurbs(cs);
>  	usb_set_intfdata(interface, NULL);
> +	usb_put_dev(udev);
>  	gigaset_freecs(cs);
>  	return rc;
>  }
> 

-- 
Tilman Schmidt                              E-Mail: tilman@imap.cc
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)

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

* Re: [PATCH] isdn/bas_gigaset: fix a leak on failure path in gigaset_probe()
  2014-07-25 22:34 [PATCH] isdn/bas_gigaset: fix a leak on failure path in gigaset_probe() Alexey Khoroshilov
  2014-07-26 10:23 ` Tilman Schmidt
@ 2014-07-29 19:18 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2014-07-29 19:18 UTC (permalink / raw)
  To: khoroshilov
  Cc: hjlipp, tilman, isdn, gigaset307x-common, netdev, linux-kernel,
	ldv-project

From: Alexey Khoroshilov <khoroshilov@ispras.ru>
Date: Sat, 26 Jul 2014 02:34:31 +0400

> There is a lack of usb_put_dev(udev) on failure path in gigaset_probe().
> 
> Found by Linux Driver Verification project (linuxtesting.org).
> 
> Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>

Applied, thanks.

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

end of thread, other threads:[~2014-07-29 19:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-25 22:34 [PATCH] isdn/bas_gigaset: fix a leak on failure path in gigaset_probe() Alexey Khoroshilov
2014-07-26 10:23 ` Tilman Schmidt
2014-07-29 19:18 ` David Miller

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