aboutsummaryrefslogtreecommitdiff
path: root/drivers/ar6000
diff options
context:
space:
mode:
authorWerner Almesberger <werner@openmoko.org>2009-03-30 21:06:02 -0300
committerWerner Almesberger <werner@openmoko.org>2009-03-30 21:10:47 -0300
commit5c7e3aef519168ab5230466f51f28b8553cbd363 (patch)
treeb6fa0efbdc96ade241cc5ff87130e1dca913ede7 /drivers/ar6000
parent3c90534a30bbfd46aad95b2277af3e8c33b8aa1a (diff)
Fix ar6000_do_activate return value
... and check the return value in ar6000_activate. [ Werner: changed ___FUNCTION__ to __func__ ] Signed-off-by: Michael Trimarchi <michael@panicking.kicks-ass.org> Signed-off-by: Werner Almesberger <werner@openmoko.org>
Diffstat (limited to 'drivers/ar6000')
-rw-r--r--drivers/ar6000/hif/hif2.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/ar6000/hif/hif2.c b/drivers/ar6000/hif/hif2.c
index 571833f2c79..8d0755f7b5a 100644
--- a/drivers/ar6000/hif/hif2.c
+++ b/drivers/ar6000/hif/hif2.c
@@ -508,7 +508,8 @@ static int ar6000_do_activate(struct hif_device *hif)
sdio_release_host(func);
hif->io_task = kthread_run(io, hif, "ar6000_io");
- if (IS_ERR(hif->io_task)) {
+ ret = IS_ERR(hif->io_task);
+ if (ret) {
dev_err(dev, "kthread_run(ar6000_io): %d\n", ret);
goto out_func_ready;
}
@@ -580,8 +581,14 @@ static int ar6000_activate(struct hif_device *hif)
mutex_lock(&hif->activate_lock);
if (!hif->active) {
ret = ar6000_do_activate(hif);
+ if (ret) {
+ printk(KERN_ERR "%s: Failed to activate %d\n",
+ __func__, ret);
+ goto out;
+ }
hif->active = 1;
}
+out:
mutex_unlock(&hif->activate_lock);
return ret;
}