From: Kalle Valo Date: Fri, 12 Jun 2009 11:14:34 +0000 (+0300) Subject: wl12xx: fix error handling in wl12xx_probe() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c4f5c8521868789caaf704c9c2d523b40ccfcb02;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git wl12xx: fix error handling in wl12xx_probe() Resources were not freed properly in some cases. Signed-off-by: Kalle Valo Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index c6a454439711..6d27cd687672 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c @@ -1274,13 +1274,15 @@ static int __devinit wl12xx_probe(struct spi_device *spi) 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);