From patchwork Fri Apr 19 01:25:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2462971 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 402353FCA5 for ; Fri, 19 Apr 2013 01:25:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967587Ab3DSBZr (ORCPT ); Thu, 18 Apr 2013 21:25:47 -0400 Received: from mail-bk0-f46.google.com ([209.85.214.46]:64297 "EHLO mail-bk0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967266Ab3DSBZr (ORCPT ); Thu, 18 Apr 2013 21:25:47 -0400 Received: by mail-bk0-f46.google.com with SMTP id je9so1539941bkc.19 for ; Thu, 18 Apr 2013 18:25:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to:cc :content-type; bh=HyrbVrr5z1kTIx8qfKjWcyqQ2IuF4Xizax78pmSVwPU=; b=b9Fb7Gxhe2j8pcWHBD4TfDV9QrN9JytAZIxnqk+D3plJ1qaFTP8xP5mSMseFBJAZ+g XjDcV0IwwW+a6Q47hnQGNYwDhwK+h7uS3eZBCN13TrdhL1XPF9wDleLeWRQn9Sz9yhzH I8G5GgM8NWFwdIO5crhre4g35igp6R4H1vxFJhaoFuifKHEwHxb+kFX1iuZrbGlESYPV eJI0cVrxa4xqffn6VIEPUhFvfmD1MwbGZape7rGKvElShUJ59UVH6rcIL02YRe75ONsN sgHJ286Ew29yNoAKEBbu3hZHHFcfV9TUHSMitMYObM5sxoSpg3zpFRvZxXjU0s5a0kSH KJQA== MIME-Version: 1.0 X-Received: by 10.204.168.68 with SMTP id t4mr4960296bky.27.1366334745680; Thu, 18 Apr 2013 18:25:45 -0700 (PDT) Received: by 10.204.0.74 with HTTP; Thu, 18 Apr 2013 18:25:45 -0700 (PDT) Date: Fri, 19 Apr 2013 09:25:45 +0800 Message-ID: Subject: [PATCH -next] mmc: dw_mmc: fix error return code in dw_mci_probe() From: Wei Yongjun To: tgih.jun@samsung.com, jh80.chung@samsung.com, cjb@laptop.org, grant.likely@linaro.org, rob.herring@calxeda.com Cc: yongjun_wei@trendmicro.com.cn, linux-mmc@vger.kernel.org, devicetree-discuss@lists.ozlabs.org Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org From: Wei Yongjun Fix to return -ENOMEM in alloc workqueue error case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Acked-by: Seungwon Jeon --- drivers/mmc/host/dw_mmc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index bc3a1bc..0652690 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -2321,8 +2321,10 @@ int dw_mci_probe(struct dw_mci *host) tasklet_init(&host->tasklet, dw_mci_tasklet_func, (unsigned long)host); host->card_workqueue = alloc_workqueue("dw-mci-card", WQ_MEM_RECLAIM | WQ_NON_REENTRANT, 1); - if (!host->card_workqueue) + if (!host->card_workqueue) { + ret = -ENOMEM; goto err_dmaunmap; + } INIT_WORK(&host->card_work, dw_mci_work_routine_card); ret = devm_request_irq(host->dev, host->irq, dw_mci_interrupt, host->irq_flags, "dw-mci", host);