From patchwork Mon Apr 9 09:36:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guillaume GARDET X-Patchwork-Id: 896196 X-Patchwork-Delegate: jh80.chung@samsung.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40KQDV3tpcz9s2S for ; Mon, 9 Apr 2018 19:36:41 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id B80C2C21DB3; Mon, 9 Apr 2018 09:36:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 99C17C21C8B; Mon, 9 Apr 2018 09:36:35 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 33CA9C21CB1; Mon, 9 Apr 2018 09:36:34 +0000 (UTC) Received: from smtp2-g21.free.fr (smtp2-g21.free.fr [212.27.42.2]) by lists.denx.de (Postfix) with ESMTPS id A23C4C21C27 for ; Mon, 9 Apr 2018 09:36:33 +0000 (UTC) Received: from localhost.localdomain (unknown [82.244.147.214]) by smtp2-g21.free.fr (Postfix) with ESMTP id C04452003D2; Mon, 9 Apr 2018 11:36:32 +0200 (CEST) From: Guillaume GARDET To: u-boot@lists.denx.de Date: Mon, 9 Apr 2018 11:36:29 +0200 Message-Id: <20180409093629.10264-1-guillaume.gardet@free.fr> X-Mailer: git-send-email 2.13.6 Cc: Guillaume GARDET Subject: [U-Boot] [PATCH] mmc: fix check of returned value of sd_read_ssr function X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" sd_read_ssr returns 0 if it succeed. Signed-off-by: Guillaume GARDET Cc: Jaehoon Chung --- drivers/mmc/mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index c930893300..92ea78b8af 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -1689,7 +1689,7 @@ static int sd_select_mode_and_width(struct mmc *mmc, uint card_caps) #if CONFIG_IS_ENABLED(MMC_WRITE) err = sd_read_ssr(mmc); - if (!err) + if (err) pr_warn("unable to read ssr\n"); #endif if (!err)