提交 c4f5c852 编写于 作者: K Kalle Valo 提交者: John W. Linville

wl12xx: fix error handling in wl12xx_probe()

Resources were not freed properly in some cases.
Signed-off-by: NKalle Valo <kalle.valo@nokia.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 1d3b8130
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册