alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 22/38] sound: ac97: add missing put_device call
       [not found] <1387465429-3568-2-git-send-email-levex@linux.com>
@ 2013-12-19 15:03 ` Levente Kurusa
  2013-12-19 16:17   ` Takashi Iwai
  2013-12-19 15:03 ` [PATCH 23/38] sound: soc: " Levente Kurusa
  1 sibling, 1 reply; 4+ messages in thread
From: Levente Kurusa @ 2013-12-19 15:03 UTC (permalink / raw)
  To: LKML
  Cc: Levente Kurusa, Jaroslav Kysela, Takashi Iwai, Ondrej Zary,
	Yacine Belkadi, alsa-devel

This is required so that we give up the last reference to the device.

Signed-off-by: Levente Kurusa <levex@linux.com>
---
 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

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

* [PATCH 23/38] sound: soc: add missing put_device call
       [not found] <1387465429-3568-2-git-send-email-levex@linux.com>
  2013-12-19 15:03 ` [PATCH 22/38] sound: ac97: add missing put_device call Levente Kurusa
@ 2013-12-19 15:03 ` Levente Kurusa
  2013-12-21 14:31   ` Mark Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Levente Kurusa @ 2013-12-19 15:03 UTC (permalink / raw)
  To: LKML
  Cc: Levente Kurusa, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, alsa-devel

This is required so that we give up the last reference to the device.

Signed-off-by: Levente Kurusa <levex@linux.com>
---
 sound/soc/soc-core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 4e53d87..21caa09 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -536,6 +536,7 @@ static int soc_ac97_dev_register(struct snd_soc_codec *codec)
 	err = device_register(&codec->ac97->dev);
 	if (err < 0) {
 		dev_err(codec->dev, "ASoC: Can't register ac97 bus\n");
+		put_device(&codec->ac97->dev);
 		codec->ac97->dev.bus = NULL;
 		return err;
 	}
-- 
1.8.3.1

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

* Re: [PATCH 22/38] sound: ac97: add missing put_device call
  2013-12-19 15:03 ` [PATCH 22/38] sound: ac97: add missing put_device call Levente Kurusa
@ 2013-12-19 16:17   ` Takashi Iwai
  0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2013-12-19 16:17 UTC (permalink / raw)
  To: Levente Kurusa
  Cc: LKML, Jaroslav Kysela, Ondrej Zary, Yacine Belkadi, alsa-devel

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
> 

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

* Re: [PATCH 23/38] sound: soc: add missing put_device call
  2013-12-19 15:03 ` [PATCH 23/38] sound: soc: " Levente Kurusa
@ 2013-12-21 14:31   ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2013-12-21 14:31 UTC (permalink / raw)
  To: Levente Kurusa; +Cc: Takashi Iwai, alsa-devel, LKML, Liam Girdwood

On Thu, Dec 19, 2013 at 04:03:34PM +0100, Levente Kurusa wrote:
> This is required so that we give up the last reference to the device.

Applied, thanks.  Please use subject lines matching the standard for the
subsystem.

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

end of thread, other threads:[~2013-12-21 14:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1387465429-3568-2-git-send-email-levex@linux.com>
2013-12-19 15:03 ` [PATCH 22/38] sound: ac97: add missing put_device call Levente Kurusa
2013-12-19 16:17   ` Takashi Iwai
2013-12-19 15:03 ` [PATCH 23/38] sound: soc: " Levente Kurusa
2013-12-21 14:31   ` Mark Brown

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).