From: Dan Carpenter <dan.carpenter@oracle.com>
To: Jaroslav Kysela <perex@perex.cz>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Takashi Iwai <tiwai@suse.de>,
alsa-devel@alsa-project.org, Bill Pemberton <wfp5p@virginia.edu>,
kernel-janitors@vger.kernel.org
Subject: [patch 2/2] ALSA: cs4236: fix pnp_irq() error handling
Date: Thu, 07 Nov 2013 08:18:45 +0000 [thread overview]
Message-ID: <20131107081845.GV21844@elgon.mountain> (raw)
pnp_irq() returns an unsigned value so the error handling here doesn't
work. I recently introduced a IORESOURCE_INVALID define to make this
less confusing.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
This needs [patch 1/2] or it won't compile. Can both patches go through
Andrew's tree?
diff --git a/sound/isa/cs423x/cs4236.c b/sound/isa/cs423x/cs4236.c
index 69614ac..9725843 100644
--- a/sound/isa/cs423x/cs4236.c
+++ b/sound/isa/cs423x/cs4236.c
@@ -293,7 +293,8 @@ static int snd_cs423x_pnp_init_mpu(int dev, struct pnp_dev *pdev)
} else {
mpu_port[dev] = pnp_port_start(pdev, 0);
if (mpu_irq[dev] >= 0 &&
- pnp_irq_valid(pdev, 0) && pnp_irq(pdev, 0) >= 0) {
+ pnp_irq_valid(pdev, 0) &&
+ pnp_irq(pdev, 0) != IORESOURCE_INVALID) {
mpu_irq[dev] = pnp_irq(pdev, 0);
} else {
mpu_irq[dev] = -1; /* disable interrupt */
reply other threads:[~2013-11-07 8:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20131107081845.GV21844@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=alsa-devel@alsa-project.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.de \
--cc=wfp5p@virginia.edu \
/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