提交 8b425e62 编写于 作者: L Luciano Coelho

wlcore: fix some failure cases in wlcore_probe()

We need to release the IRQ if hw_info() or identify_chip() fails.  And
we need unregister the HW with mac80211 if there are any failures
after it's registered.
Signed-off-by: NLuciano Coelho <coelho@ti.com>
上级 e59bec16
...@@ -5520,12 +5520,12 @@ int __devinit wlcore_probe(struct wl1271 *wl, struct platform_device *pdev) ...@@ -5520,12 +5520,12 @@ int __devinit wlcore_probe(struct wl1271 *wl, struct platform_device *pdev)
ret = wl12xx_get_hw_info(wl); ret = wl12xx_get_hw_info(wl);
if (ret < 0) { if (ret < 0) {
wl1271_error("couldn't get hw info"); wl1271_error("couldn't get hw info");
goto out; goto out_irq;
} }
ret = wl->ops->identify_chip(wl); ret = wl->ops->identify_chip(wl);
if (ret < 0) if (ret < 0)
goto out; goto out_irq;
ret = wl1271_init_ieee80211(wl); ret = wl1271_init_ieee80211(wl);
if (ret) if (ret)
...@@ -5539,7 +5539,7 @@ int __devinit wlcore_probe(struct wl1271 *wl, struct platform_device *pdev) ...@@ -5539,7 +5539,7 @@ int __devinit wlcore_probe(struct wl1271 *wl, struct platform_device *pdev)
ret = device_create_file(wl->dev, &dev_attr_bt_coex_state); ret = device_create_file(wl->dev, &dev_attr_bt_coex_state);
if (ret < 0) { if (ret < 0) {
wl1271_error("failed to create sysfs file bt_coex_state"); wl1271_error("failed to create sysfs file bt_coex_state");
goto out_irq; goto out_unreg;
} }
/* Create sysfs file to get HW PG version */ /* Create sysfs file to get HW PG version */
...@@ -5564,6 +5564,9 @@ int __devinit wlcore_probe(struct wl1271 *wl, struct platform_device *pdev) ...@@ -5564,6 +5564,9 @@ int __devinit wlcore_probe(struct wl1271 *wl, struct platform_device *pdev)
out_bt_coex_state: out_bt_coex_state:
device_remove_file(wl->dev, &dev_attr_bt_coex_state); device_remove_file(wl->dev, &dev_attr_bt_coex_state);
out_unreg:
wl1271_unregister_hw(wl);
out_irq: out_irq:
free_irq(wl->irq, wl); free_irq(wl->irq, wl);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册