>From 31adcc3a80fe1f95a6fc8b5cfdb69076b3144df2 Mon Sep 17 00:00:00 2001 From: michael <[email protected]> Date: Wed, 18 Mar 2009 12:01:41 +0100 Subject: [PATCH] Check the return value
Signed-off-by: Michael Trimarchi <[email protected]> --- drivers/ar6000/hif/hif2.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/drivers/ar6000/hif/hif2.c b/drivers/ar6000/hif/hif2.c index 571833f..ccfd8e1 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", + __FUNCTION__, ret); + goto out; + } hif->active = 1; } +out: mutex_unlock(&hif->activate_lock); return ret; } -- 1.5.6.5
