applicom: dereferencing NULL on error path

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: 819a3eba42 ('[PATCH] applicom: fix error handling')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Dan Carpenter 2014-05-09 14:59:16 +03:00 committed by Greg Kroah-Hartman
parent 63fa80cd58
commit 8bab797c6e

View file

@ -345,7 +345,6 @@ static int __init applicom_init(void)
free_irq(apbs[i].irq, &dummy); free_irq(apbs[i].irq, &dummy);
iounmap(apbs[i].RamIO); iounmap(apbs[i].RamIO);
} }
pci_disable_device(dev);
return ret; return ret;
} }