Resources were not freed properly in some cases.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
wl->set_power = pdata->set_power;
if (!wl->set_power) {
wl12xx_error("set power function missing in platform data");
- return -ENODEV;
+ ret = -ENODEV;
+ goto out_free;
}
wl->irq = spi->irq;
if (wl->irq < 0) {
wl12xx_error("irq missing in platform data");
- return -ENODEV;
+ ret = -ENODEV;
+ goto out_free;
}
ret = request_irq(wl->irq, wl12xx_irq, 0, DRIVER_NAME, wl);