applicom: dereferencing NULL on error path
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 9 May 2014 11:59:16 +0000 (14:59 +0300)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 6 Aug 2014 17:07:41 +0000 (18:07 +0100)
commit 8bab797c6e5724a43b7666ad70860712365cdb71 upstream.

This is a static checker fix.  The "dev" variable is always NULL after
the while statement so we would be dereferencing a NULL pointer here.

Fixes: 819a3eba4233 ('[PATCH] applicom: fix error handling')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/char/applicom.c

index 25373df..5d069c7 100644 (file)
@@ -345,7 +345,6 @@ out:
                        free_irq(apbs[i].irq, &dummy);
                iounmap(apbs[i].RamIO);
        }
-       pci_disable_device(dev);
        return ret;
 }