lkml.org 
[lkml]   [2013]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 22/38] sound: ac97: add missing put_device call
At Thu, 19 Dec 2013 16:03:33 +0100,
Levente Kurusa wrote:
>
> This is required so that we give up the last reference to the device.
>
> Signed-off-by: Levente Kurusa <levex@linux.com>

Hmm, I see no merit by this patch. It's an error path and the device
is referenced from nowhere, thus we don't care its refcount any longer
from there. Any missing point?


thanks,

Takashi

> ---
> sound/pci/ac97/ac97_codec.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
> index bf578ba2..55186f8 100644
> --- a/sound/pci/ac97/ac97_codec.c
> +++ b/sound/pci/ac97/ac97_codec.c
> @@ -1964,6 +1964,7 @@ static int snd_ac97_dev_register(struct snd_device *device)
> snd_ac97_get_short_name(ac97));
> if ((err = device_register(&ac97->dev)) < 0) {
> snd_printk(KERN_ERR "Can't register ac97 bus\n");
> + put_device(&ac97->dev);
> ac97->dev.bus = NULL;
> return err;
> }
> --
> 1.8.3.1
>


\
 
 \ /
  Last update: 2013-12-19 19:01    [W:0.566 / U:1.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site