From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753741Ab3LSQRP (ORCPT ); Thu, 19 Dec 2013 11:17:15 -0500 Received: from cantor2.suse.de ([195.135.220.15]:60053 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751682Ab3LSQRO (ORCPT ); Thu, 19 Dec 2013 11:17:14 -0500 Date: Thu, 19 Dec 2013 17:17:12 +0100 Message-ID: From: Takashi Iwai To: Levente Kurusa Cc: LKML , Jaroslav Kysela , Ondrej Zary , Yacine Belkadi , alsa-devel@alsa-project.org Subject: Re: [PATCH 22/38] sound: ac97: add missing put_device call In-Reply-To: <1387465429-3568-23-git-send-email-levex@linux.com> References: <1387465429-3568-2-git-send-email-levex@linux.com> <1387465429-3568-23-git-send-email-levex@linux.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 >