public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lubomir Rintel <lkundrak@v3.sk>
To: Alexey Khoroshilov <khoroshilov@ispras.ru>
Cc: Hans Verkuil <hverkuil@xs4all.nl>,
	Mauro Carvalho Chehab <m.chehab@samsung.com>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	ldv-project@linuxtesting.org
Subject: Re: [PATCH] [media] usbtv: fix leak at failure path in usbtv_probe()
Date: Tue, 27 May 2014 01:50:38 +0200	[thread overview]
Message-ID: <1401148238.1590.2.camel@odvarok> (raw)
In-Reply-To: <1400878027-22954-1-git-send-email-khoroshilov@ispras.ru>

On Sat, 2014-05-24 at 00:47 +0400, Alexey Khoroshilov wrote:
> Error handling code in usbtv_probe() misses usb_put_dev().
> 
> Found by Linux Driver Verification project (linuxtesting.org).
> 
> Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>

Acked-by: Lubomir Rintel <lkundrak@v3.sk>

Thank you!
Lubo

> ---
>  drivers/media/usb/usbtv/usbtv-core.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/media/usb/usbtv/usbtv-core.c b/drivers/media/usb/usbtv/usbtv-core.c
> index 2f87ddfa469f..473fab81b602 100644
> --- a/drivers/media/usb/usbtv/usbtv-core.c
> +++ b/drivers/media/usb/usbtv/usbtv-core.c
> @@ -91,6 +91,8 @@ static int usbtv_probe(struct usb_interface *intf,
>  	return 0;
>  
>  usbtv_video_fail:
> +	usb_set_intfdata(intf, NULL);
> +	usb_put_dev(usbtv->udev);
>  	kfree(usbtv);
>  
>  	return ret;



      reply	other threads:[~2014-05-26 23:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-23 20:47 [PATCH] [media] usbtv: fix leak at failure path in usbtv_probe() Alexey Khoroshilov
2014-05-26 23:50 ` Lubomir Rintel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1401148238.1590.2.camel@odvarok \
    --to=lkundrak@v3.sk \
    --cc=hverkuil@xs4all.nl \
    --cc=khoroshilov@ispras.ru \
    --cc=ldv-project@linuxtesting.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox