lkml.org 
[lkml]   [2017]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 08/12] isdn: hisax: Fix pnp_irq's error checking for setup_isurf
    Date
    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/isurf.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/isdn/hisax/isurf.c b/drivers/isdn/hisax/isurf.c
    index 1399ddd..53e299b 100644
    --- a/drivers/isdn/hisax/isurf.c
    +++ b/drivers/isdn/hisax/isurf.c
    @@ -238,7 +238,7 @@ int setup_isurf(struct IsdnCard *card)
    cs->hw.isurf.reset = pnp_port_start(pnp_d, 0);
    cs->hw.isurf.phymem = pnp_mem_start(pnp_d, 1);
    cs->irq = pnp_irq(pnp_d, 0);
    - if (!cs->irq || !cs->hw.isurf.reset || !cs->hw.isurf.phymem) {
    + if (cs->irq == -1 || !cs->hw.isurf.reset || !cs->hw.isurf.phymem) {
    printk(KERN_ERR "ISurfPnP:some resources are missing %d/%x/%lx\n",
    cs->irq, cs->hw.isurf.reset, cs->hw.isurf.phymem);
    pnp_disable_dev(pnp_d);
    --
    1.9.1
    \
     
     \ /
      Last update: 2017-11-16 05:33    [W:7.309 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site