From patchwork Thu Aug 6 07:23:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaehoon Chung X-Patchwork-Id: 6956691 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 85C0EC05AC for ; Thu, 6 Aug 2015 07:23:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BCFFA20667 for ; Thu, 6 Aug 2015 07:23:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EAB7A2062B for ; Thu, 6 Aug 2015 07:23:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754662AbbHFHXd (ORCPT ); Thu, 6 Aug 2015 03:23:33 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:56193 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754683AbbHFHXa (ORCPT ); Thu, 6 Aug 2015 03:23:30 -0400 Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NSN02Q53GJ4D300@mailout2.samsung.com> for linux-mmc@vger.kernel.org; Thu, 06 Aug 2015 16:23:28 +0900 (KST) Received: from epcpsbgm2new.samsung.com ( [172.20.52.116]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id CB.ED.24422.07B03C55; Thu, 6 Aug 2015 16:23:28 +0900 (KST) X-AuditID: cbfee68f-f793b6d000005f66-98-55c30b709f70 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id D5.1F.07062.07B03C55; Thu, 6 Aug 2015 16:23:28 +0900 (KST) Received: from localhost.localdomain ([10.252.81.186]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NSN007P2GJ4RG30@mmp2.samsung.com>; Thu, 06 Aug 2015 16:23:28 +0900 (KST) From: Jaehoon Chung To: linux-mmc@vger.kernel.org Cc: ulf.hansson@linaro.org, Jaehoon Chung Subject: [PATCH 1/3] mmc: dw_mmc: fix the wrong condition checking Date: Thu, 06 Aug 2015 16:23:24 +0900 Message-id: <1438845806-4486-1-git-send-email-jh80.chung@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrCLMWRmVeSWpSXmKPExsWyRsSkRLeA+3Cowbq5ahY3frWxWhz5389o cXxtuAOzx51re9g8+rasYvT4vEkugDmKyyYlNSezLLVI3y6BK6P7eQNTQTNrxcYvi9kaGHtZ uhg5OSQETCTeT34GZYtJXLi3nq2LkYtDSGAFo8Sx/nesMEXf5j1lgUjMYpRYMf84M0hCSOAH o8Shq/kgNpuAjsT2b8eZQGwRAVmJn38usIHYzAJOElfvdbKD2MJA9ro5S8CGsgioSly+uArM 5hVwlWj9+4wJYpmcxMljk1lBlkkIXGaTWHrtPgtEg4DEt8mHgGwOoISsxKYDzBD1khIHV9xg mcAouICRYRWjaGpBckFxUnqRsV5xYm5xaV66XnJ+7iZGYOCd/vesfwfj3QPWhxgFOBiVeHgf rDkUKsSaWFZcmXuI0RRow0RmKdHkfGB455XEGxqbGVmYmpgaG5lbmimJ8y6U+hksJJCeWJKa nZpakFoUX1Sak1p8iJGJg1OqgfHA5zV3lUUrug4uFCrmPnGaf42gldlxWXMx5733eR13BLGu 776w9OXt2CfGrvnyE7r3zsg/ZflH7cj6VcuNbb9oR17fnC96OMclzcRj+v7TNZx7tFrv/3/2 9r7srD9t57Tdnx+/Ez6jXqeyUmkJ61y7XX356ioTaw7ZHzI1abi16rXc7Hu1clOVWIozEg21 mIuKEwEIpThRNwIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrILMWRmVeSWpSXmKPExsVy+t9jQd0C7sOhBrtXyFvc+NXGanHkfz+j xfG14Q7MHneu7WHz6NuyitHj8ya5AOaoBkabjNTElNQihdS85PyUzLx0WyXv4HjneFMzA0Nd Q0sLcyWFvMTcVFslF58AXbfMHKBFSgpliTmlQKGAxOJiJX07TBNCQ9x0LWAaI3R9Q4LgeowM 0EDCGsaM7ucNTAXNrBUbvyxma2DsZeli5OSQEDCR+DbvKZQtJnHh3nq2LkYuDiGBWYwSK+Yf ZwZJCAn8YJQ4dDUfxGYT0JHY/u04E4gtIiAr8fPPBTYQm1nASeLqvU52EFsYyF43ZwkriM0i oCpx+eIqMJtXwFWi9e8zJohlchInj01mncDIvYCRYRWjRGpBckFxUnquUV5quV5xYm5xaV66 XnJ+7iZGcHA/k97BeHiX+yFGAQ5GJR7eB2sOhQqxJpYVV+YeYpTgYFYS4d16ASjEm5JYWZVa lB9fVJqTWnyI0RTogInMUqLJ+cDIyyuJNzQ2MTOyNDI3tDAyNlcS59U32RQqJJCeWJKanZpa kFoE08fEwSnVwBi+JCVQ8/Abz3qN0xzzlRvF8l9VdF5gjPIIYVz+StA4x3jaiQ1C1WF9Ynf7 tqZY9Z9sKHqWq6DqrsMsbFWoJP/vKX95SsUCn52qBqJxvk+dzp/ZmBOcU3vy7B91+9tRX7ac uVUSVLq+8dSTJ+5tbZIthuxn69Lm1d/Z+6z8jQZ79t0H9/dUKbEUZyQaajEXFScCAHGFn3GE AgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When num-slots is lower than 1, it's right that should be returned -ENODEV. Signed-off-by: Jaehoon Chung Reviewed-by: Alim Akhtar Tested-by: Alim Akhtar --- drivers/mmc/host/dw_mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 3c0e199..de88e64 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -2760,7 +2760,7 @@ int dw_mci_probe(struct dw_mci *host) } } - if (host->pdata->num_slots > 1) { + if (host->pdata->num_slots < 1) { dev_err(host->dev, "Platform data must supply num_slots.\n"); return -ENODEV;