mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
To: isdn@linux-pingi.de, davem@davemloft.net,
	stephen@networkplumber.org, johannes.berg@intel.com
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH 04/12] isdn: hisax: Fix pnp_irq's error checking for setup_elsa_isapnp
Date: Thu, 16 Nov 2017 09:57:21 +0530	[thread overview]
Message-ID: <2d169e32d2abac9872ad4cbb172e1fb3398db8df.1510805781.git.arvind.yadav.cs@gmail.com> (raw)
In-Reply-To: <cover.1510805781.git.arvind.yadav.cs@gmail.com>
In-Reply-To: <cover.1510805781.git.arvind.yadav.cs@gmail.com>

The pnp_irq() function returns -1 if an error occurs.
pnp_irq() error checking for zero is not correct.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/isdn/hisax/elsa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/isdn/hisax/elsa.c b/drivers/isdn/hisax/elsa.c
index 03bc5d5..f8dcac8 100644
--- a/drivers/isdn/hisax/elsa.c
+++ b/drivers/isdn/hisax/elsa.c
@@ -945,7 +945,7 @@ static int setup_elsa_isapnp(struct IsdnCard *card)
 					card->para[1] = pnp_port_start(pnp_d, 0);
 					card->para[0] = pnp_irq(pnp_d, 0);
 
-					if (!card->para[0] || !card->para[1]) {
+					if (card->para[0] == -1 || !card->para[1]) {
 						printk(KERN_ERR "Elsa PnP:some resources are missing %ld/%lx\n",
 						       card->para[0], card->para[1]);
 						pnp_disable_dev(pnp_d);
-- 
1.9.1

  parent reply	other threads:[~2017-11-16  4:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-16  4:27 [PATCH 00/12] isdn: hisax: Fix pnp_irq's error checking Arvind Yadav
2017-11-16  4:27 ` [PATCH 01/12] isdn: hisax: Fix pnp_irq's error checking for setup_asuscom Arvind Yadav
2017-11-16  4:27 ` [PATCH 02/12] isdn: hisax: Fix pnp_irq's error checking for avm_pnp_setup Arvind Yadav
2017-11-16  4:27 ` [PATCH 03/12] isdn: hisax: Fix pnp_irq's error checking for setup_diva_isapnp Arvind Yadav
2017-11-16  4:27 ` Arvind Yadav [this message]
2017-11-16  4:27 ` [PATCH 05/12] isdn: hisax: Fix pnp_irq's error checking for setup_hfcsx Arvind Yadav
2017-11-16  4:27 ` [PATCH 06/12] isdn: hisax: Fix pnp_irq's error checking for setup_hfcs Arvind Yadav
2017-11-16  4:27 ` [PATCH 07/12] isdn: hisax: Handle return value of pnp_irq and pnp_port_start Arvind Yadav
2017-11-16  4:27 ` [PATCH 08/12] isdn: hisax: Fix pnp_irq's error checking for setup_isurf Arvind Yadav
2017-11-16  4:27 ` [PATCH 09/12] isdn: hisax: Fix pnp_irq's error checking for setup_ix1micro Arvind Yadav
2017-11-16  4:27 ` [PATCH 10/12] isdn: hisax: Fix pnp_irq's error checking for setup_niccy Arvind Yadav
2017-11-16  4:27 ` [PATCH 11/12] isdn: hisax: Fix pnp_irq's error checking for setup_sedlbauer_isapnp Arvind Yadav
2017-11-16  4:27 ` [PATCH 12/12] isdn: hisax: Fix pnp_irq's error checking for setup_teles3 Arvind Yadav
2017-11-16 13:32 ` [PATCH 00/12] isdn: hisax: Fix pnp_irq's error checking David Miller

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=2d169e32d2abac9872ad4cbb172e1fb3398db8df.1510805781.git.arvind.yadav.cs@gmail.com \
    --to=arvind.yadav.cs@gmail.com \
    --cc=davem@davemloft.net \
    --cc=isdn@linux-pingi.de \
    --cc=johannes.berg@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /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®