From patchwork Wed Mar 30 00:56:23 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Rodriguez X-Patchwork-Id: 672832 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2U0vgCI029288 for ; Wed, 30 Mar 2011 00:57:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755357Ab1C3A5l (ORCPT ); Tue, 29 Mar 2011 20:57:41 -0400 Received: from mail.atheros.com ([12.19.149.2]:47178 "EHLO mail.atheros.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755351Ab1C3A5k (ORCPT ); Tue, 29 Mar 2011 20:57:40 -0400 Received: from mail.atheros.com ([10.10.20.105]) by sidewinder.atheros.com for ; Tue, 29 Mar 2011 17:57:16 -0700 Received: from tux (10.10.10.239) by SC1EXHC-01.global.atheros.com (10.10.20.106) with Microsoft SMTP Server (TLS) id 8.2.213.0; Tue, 29 Mar 2011 17:57:38 -0700 Received: by tux (sSMTP sendmail emulation); Tue, 29 Mar 2011 17:57:37 -0700 From: "Luis R. Rodriguez" To: CC: , , , , "Luis R. Rodriguez" Subject: [PATCH 26/34] ath6kl: propagate errors on hifEnableFunc() failures Date: Tue, 29 Mar 2011 17:56:23 -0700 Message-ID: <1301446591-15236-27-git-send-email-lrodriguez@atheros.com> X-Mailer: git-send-email 1.7.4.15.g7811d In-Reply-To: <1301446591-15236-1-git-send-email-lrodriguez@atheros.com> References: <1301446591-15236-1-git-send-email-lrodriguez@atheros.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 30 Mar 2011 00:57:42 +0000 (UTC) diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c index 001f993..1752b33 100644 --- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c +++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c @@ -1012,7 +1012,7 @@ static int hifEnableFunc(struct hif_device *device, struct sdio_func *func) if (ret) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("AR6000: failed to enable 4-bit ASYNC IRQ mode %d \n",ret)); sdio_release_host(func); - return A_ERROR; + return ret; } AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: 4-bit ASYNC IRQ mode enabled\n")); } @@ -1023,14 +1023,14 @@ static int hifEnableFunc(struct hif_device *device, struct sdio_func *func) AR_DEBUG_PRINTF(ATH_DEBUG_ERROR, ("AR6000: %s(), Unable to enable AR6K: 0x%X\n", __FUNCTION__, ret)); sdio_release_host(func); - return A_ERROR; + return ret; } ret = sdio_set_block_size(func, HIF_MBOX_BLOCK_SIZE); sdio_release_host(func); if (ret) { AR_DEBUG_PRINTF(ATH_DEBUG_ERROR, ("AR6000: %s(), Unable to set block size 0x%x AR6K: 0x%X\n", __FUNCTION__, HIF_MBOX_BLOCK_SIZE, ret)); - return A_ERROR; + return ret; } device->is_disabled = false; /* create async I/O thread */ @@ -1041,7 +1041,7 @@ static int hifEnableFunc(struct hif_device *device, struct sdio_func *func) "AR6K Async"); if (IS_ERR(device->async_task)) { AR_DEBUG_PRINTF(ATH_DEBUG_ERROR, ("AR6000: %s(), to create async task\n", __FUNCTION__)); - return A_ERROR; + return -ENOMEM; } AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: start async task\n")); wake_up_process(device->async_task ); @@ -1056,14 +1056,14 @@ static int hifEnableFunc(struct hif_device *device, struct sdio_func *func) } else { taskFunc = enable_task; taskName = "AR6K enable"; - ret = A_PENDING; + ret = -ENOMEM; #endif /* CONFIG_PM */ } /* create resume thread */ pTask = kthread_create(taskFunc, (void *)device, taskName); if (IS_ERR(pTask)) { AR_DEBUG_PRINTF(ATH_DEBUG_ERROR, ("AR6000: %s(), to create enabel task\n", __FUNCTION__)); - return A_ERROR; + return -ENOMEM; } wake_up_process(pTask); AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifEnableFunc\n"));