diff options
author | Kalle Valo <kalle.valo@nokia.com> | 2009-06-12 11:14:34 (GMT) |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-10 18:57:42 (GMT) |
commit | c4f5c8521868789caaf704c9c2d523b40ccfcb02 (patch) | |
tree | 67d028c02f50a11e1c790a5bdc8130bf271bec73 /drivers/net | |
parent | 1d3b8130611bbe50168ad0a12841735c9c235410 (diff) | |
download | linux-fsl-qoriq-c4f5c8521868789caaf704c9c2d523b40ccfcb02.tar.xz |
wl12xx: fix error handling in wl12xx_probe()
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index c6a4544..6d27cd6 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); |