From patchwork Tue May 28 05:25:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2622931 Return-Path: X-Original-To: patchwork-linux-omap@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 958C440232 for ; Tue, 28 May 2013 05:25:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932689Ab3E1FZZ (ORCPT ); Tue, 28 May 2013 01:25:25 -0400 Received: from mail-bk0-f44.google.com ([209.85.214.44]:43902 "EHLO mail-bk0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932458Ab3E1FZZ (ORCPT ); Tue, 28 May 2013 01:25:25 -0400 Received: by mail-bk0-f44.google.com with SMTP id jc3so3962043bkc.3 for ; Mon, 27 May 2013 22:25:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=ck7ot/rVGMvOesZP8OgSL6LDz/pWZsjptPf+aONnnPs=; b=c26WWnrCpu2N5Tl1adQHZpvKSQ+o/SVOPRrwerps/XwhZQNtcVaJhOO89uXrhXDyIg 2KX4vIaqeCSidmUdgBp/G7CmLdItHe/sXNhyKVTVSjSRUjZ1GiMrdum/a6FNRg88wWX9 /yr+75QCuKQ5yzraPeOH0U2voAZzYqrMb70hoAFeXfe5gJLj1HRL40aGf37dt1LJWaiO 5Gd1JoUtYHrfv2sXh/4Z7eHK1PqDEMcu65WSmNuQk0Rz98mIl+/BjPbGZmEAc7O7fg06 RuZKHn3ctslgG/x7yTGuQNwJTTs3dbQu1JCz78IPMU8IitH6y6GH0sWasMkoQayYidld 12YQ== MIME-Version: 1.0 X-Received: by 10.204.189.134 with SMTP id de6mr12191125bkb.126.1369718723453; Mon, 27 May 2013 22:25:23 -0700 (PDT) Received: by 10.204.39.1 with HTTP; Mon, 27 May 2013 22:25:23 -0700 (PDT) Date: Tue, 28 May 2013 13:25:23 +0800 Message-ID: Subject: [PATCH] mmc: omap: fix error return code in mmc_omap_probe() From: Wei Yongjun To: jarkko.lavinen@nokia.com, cjb@laptop.org Cc: yongjun_wei@trendmicro.com.cn, linux-omap@vger.kernel.org, linux-mmc@vger.kernel.org Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Wei Yongjun Fix to return -ENOMEM in the workqueue alloc error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/mmc/host/omap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-omap" 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/omap.c b/drivers/mmc/host/omap.c index 4b3e0eb..5d0bd0c 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c @@ -1455,8 +1455,10 @@ static int mmc_omap_probe(struct platform_device *pdev) host->reg_shift = (mmc_omap7xx() ? 1 : 2); host->mmc_omap_wq = alloc_workqueue("mmc_omap", 0, 0); - if (!host->mmc_omap_wq) + if (!host->mmc_omap_wq) { + ret = -ENOMEM; goto err_plat_cleanup; + } for (i = 0; i < pdata->nr_slots; i++) { ret = mmc_omap_new_slot(host, i);