* [PATCH] sound/pci/azt3328.c: adjust error handling code to include debugging code
@ 2011-08-10 9:49 Julia Lawall
2011-08-10 9:54 ` Takashi Iwai
0 siblings, 1 reply; 5+ messages in thread
From: Julia Lawall @ 2011-08-10 9:49 UTC (permalink / raw)
To: Jaroslav Kysela
Cc: alsa-devel, Takashi Iwai, kernel-janitors, linux-kernel,
Andreas Mohr, Lucas De Marchi
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>
---
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)");
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] sound/pci/azt3328.c: adjust error handling code to include debugging code
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
2011-08-10 11:15 ` [PATCH] sound/pci/azt3328.c: adjust error handling code to Andreas Mohr
0 siblings, 1 reply; 5+ messages in thread
From: Takashi Iwai @ 2011-08-10 9:54 UTC (permalink / raw)
To: Julia Lawall
Cc: alsa-devel, Lucas De Marchi, kernel-janitors, linux-kernel,
Andreas Mohr
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)");
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] sound/pci/azt3328.c: adjust error handling code to
2011-08-10 9:54 ` Takashi Iwai
@ 2011-08-10 11:15 ` Andreas Mohr
2011-08-10 11:31 ` [PATCH] sound/pci/azt3328.c: adjust error handling code to include debugging code Takashi Iwai
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Mohr @ 2011-08-10 11:15 UTC (permalink / raw)
To: Takashi Iwai
Cc: alsa-devel, Lucas De Marchi, kernel-janitors, linux-kernel,
Andreas Mohr, Julia Lawall
Hi,
On Wed, Aug 10, 2011 at 11:54:08AM +0200, Takashi Iwai wrote:
> 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.
5 minutes, 4 seconds. Your responsiveness appears to be degrading. I've
seen better ;)
JFTR:
Acked-by: Andreas Mohr <andi@lisas.de>
Andreas Mohr
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] sound/pci/azt3328.c: adjust error handling code to include debugging code
2011-08-10 11:15 ` [PATCH] sound/pci/azt3328.c: adjust error handling code to Andreas Mohr
@ 2011-08-10 11:31 ` Takashi Iwai
2011-08-10 12:26 ` [PATCH] sound/pci/azt3328.c: adjust error handling code to Andreas Mohr
0 siblings, 1 reply; 5+ messages in thread
From: Takashi Iwai @ 2011-08-10 11:31 UTC (permalink / raw)
To: Andreas Mohr
Cc: alsa-devel, Lucas De Marchi, kernel-janitors, linux-kernel,
Julia Lawall
At Wed, 10 Aug 2011 13:15:42 +0200,
Andreas Mohr wrote:
>
> Hi,
>
> On Wed, Aug 10, 2011 at 11:54:08AM +0200, Takashi Iwai wrote:
> > 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.
>
> 5 minutes, 4 seconds. Your responsiveness appears to be degrading. I've
> seen better ;)
Oh, could you bisect a regression? ;)
Takashi
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] sound/pci/azt3328.c: adjust error handling code to
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 ` Andreas Mohr
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Mohr @ 2011-08-10 12:26 UTC (permalink / raw)
To: Takashi Iwai
Cc: alsa-devel, Lucas De Marchi, kernel-janitors, linux-kernel,
Andreas Mohr, Julia Lawall
Hi,
On Wed, Aug 10, 2011 at 01:31:24PM +0200, Takashi Iwai wrote:
> At Wed, 10 Aug 2011 13:15:42 +0200,
> Andreas Mohr wrote:
> > 5 minutes, 4 seconds. Your responsiveness appears to be degrading. I've
> > seen better ;)
>
> Oh, could you bisect a regression? ;)
I'd probably have to consult Gunther von Hagens :-P
Andreas Mohr
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-08-10 12:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox