From: "Jon Masters" <jonathan@jonmasters.org>
To: "Takashi Iwai" <tiwai@suse.de>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sound: fix hang in mpu401_uart.c
Date: Wed, 19 Apr 2006 00:45:14 +0100 [thread overview]
Message-ID: <35fb2e590604181645h32107d4fma13ddd8c7649bc13@mail.gmail.com> (raw)
In-Reply-To: <s5hbquzxbsm.wl%tiwai@suse.de>
On 4/18/06, Takashi Iwai <tiwai@suse.de> wrote:
> > + if ((err = snd_mpu401_uart_cmd(mpu, MPU401_RESET, 1))) {
> > + return -EFAULT;
>
> IMO, -EFAULT isn't a good choice for this kind of error.
What would you suggest?
> > if (mpu->open_output && (err = mpu->open_output(mpu)) < 0)
> > return err;
> > if (! test_bit(MPU401_MODE_BIT_INPUT, &mpu->mode)) {
> > - snd_mpu401_uart_cmd(mpu, MPU401_RESET, 1);
> > - snd_mpu401_uart_cmd(mpu, MPU401_ENTER_UART, 1);
> > + if ((err = snd_mpu401_uart_cmd(mpu, MPU401_RESET, 1)))
> > + return -EFAULT;
> > + if ((err = snd_mpu401_uart_cmd(mpu, MPU401_ENTER_UART, 1)))
> > + return -EFAULT;
> Missing close in the error path?
I'll respin the patch later, but first, what should I return on open
when the underlying hardware is not there?
Jon.
next prev parent reply other threads:[~2006-04-18 23:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-16 3:12 Jon Masters
2006-04-18 13:18 ` Takashi Iwai
2006-04-18 23:45 ` Jon Masters [this message]
2006-04-19 9:33 ` Takashi Iwai
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=35fb2e590604181645h32107d4fma13ddd8c7649bc13@mail.gmail.com \
--to=jonathan@jonmasters.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tiwai@suse.de \
/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
all inboxes | Powered by JetHome®