From: Takashi Iwai <tiwai@suse.de>
To: Julia Lawall <julia@diku.dk>
Cc: alsa-devel@alsa-project.org,
Lucas De Marchi <lucas.demarchi@profusion.mobi>,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
Andreas Mohr <andi@lisas.de>
Subject: Re: [PATCH] sound/pci/azt3328.c: adjust error handling code to include debugging code
Date: Wed, 10 Aug 2011 09:54:08 +0000 [thread overview]
Message-ID: <s5hk4albni7.wl%tiwai@suse.de> (raw)
In-Reply-To: <1312969744-29659-1-git-send-email-julia@diku.dk>
At Wed, 10 Aug 2011 11:49:04 +0200,
Julia Lawall wrote:
>
> From: Julia Lawall <julia@diku.dk>
>
> snd_azf3328_dbgcallenter is called at the very beginning of the function,
> so it could be useful to call snd_azf3328_dbgcallleave at all exit points.
>
> Signed-off-by: Julia Lawall <julia@diku.dk>
Applied now to sound git tree. Thanks.
Takashi
> ---
> sound/pci/azt3328.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/sound/pci/azt3328.c b/sound/pci/azt3328.c
> index e4d76a2..579fc0d 100644
> --- a/sound/pci/azt3328.c
> +++ b/sound/pci/azt3328.c
> @@ -2625,16 +2625,19 @@ snd_azf3328_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
> int err;
>
> snd_azf3328_dbgcallenter();
> - if (dev >= SNDRV_CARDS)
> - return -ENODEV;
> + if (dev >= SNDRV_CARDS) {
> + err = -ENODEV;
> + goto out;
> + }
> if (!enable[dev]) {
> dev++;
> - return -ENOENT;
> + err = -ENOENT;
> + goto out;
> }
>
> err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
> if (err < 0)
> - return err;
> + goto out;
>
> strcpy(card->driver, "AZF3328");
> strcpy(card->shortname, "Aztech AZF3328 (PCI168)");
>
next prev parent reply other threads:[~2011-08-10 9:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-10 9:49 [PATCH] sound/pci/azt3328.c: adjust error handling code to include debugging code Julia Lawall
2011-08-10 9:54 ` Takashi Iwai [this message]
2011-08-10 11:15 ` [PATCH] sound/pci/azt3328.c: adjust error handling code to Andreas Mohr
2011-08-10 11:31 ` [PATCH] sound/pci/azt3328.c: adjust error handling code to include debugging code Takashi Iwai
2011-08-10 12:26 ` [PATCH] sound/pci/azt3328.c: adjust error handling code to Andreas Mohr
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=s5hk4albni7.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=andi@lisas.de \
--cc=julia@diku.dk \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lucas.demarchi@profusion.mobi \
/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