Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp128698imm; Tue, 16 Oct 2018 19:37:07 -0700 (PDT) X-Google-Smtp-Source: ACcGV62L5B4pu6jnqdgBoyMDwu78i5ydeRPUdsuVZo1NSd43jPR6UnIkUOPcokMEe0cNUwiXaf3M X-Received: by 2002:a62:8145:: with SMTP id t66-v6mr24007270pfd.192.1539743827157; Tue, 16 Oct 2018 19:37:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539743827; cv=none; d=google.com; s=arc-20160816; b=utMze1G6FdcLE2rE852DGPHxpQnJQeUujA1dYDk1hyWhvHulioEWWa4lcPRnvcVYrp 0ytCB2fg/Vppyzd8bVzpUrwG8MXguoXKXaicn3eL1IvRtj0IBMOCEANYdyv3935m6FH/ YUMdJ9bM95RO064vWo19UcEspyOFL+Ea5UG4so3ZkeUhknIfxansKODi3vSDsoPPKd1C m4yJmPMQtTa3gz7u4084ZxOiRCSjgZF95nDlrWpzG5KTeEc7RXpafDsWvJ0xkzxkPg0C SbhYcfg+3iIhDpRrrsgSUjbg+2ZMRwIt6R29rg6W1zCIS8rpKSs5ZS6smCjseU/qboVh MsZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=DpVyLpaYpKxn3MkItBlXIeWEUn9Iur/iIXy1OBbwJuI=; b=l2uCN3H3z7G0w1jUy8sWZIhTIB7u6G0J858QhcenKQXcOTP1SLVXawUEHkmu5OkR2p 3+trGoVwlLCaZJnIiywrXqKIGMITFg8dRR6lAYDKIbkDKGpKNFkqtJi9PPkRGQ+kmhOx bRcoXEFY2VRAnxViXDWfSdrAsNOnknNWjwebE8g6qsUQ1172A3lh7Mq1cZc5fH6UF7L+ 9asMG7fRn8rARcqwpOC5Txf9FSgm3VUR++4jjq3Io74rWasyTxGBRWtbB3l8svPQeDlk +tZ3MYYr3YQhlL6sGO+2BY0zhaZP0NpxxkRlbKSYq30jhbybQ/ZsjOdbXMgF/qcVojAb v8gQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VuqOe47X; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t30-v6si2500745pgl.452.2018.10.16.19.36.51; Tue, 16 Oct 2018 19:37:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VuqOe47X; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727243AbeJQK3y (ORCPT + 99 others); Wed, 17 Oct 2018 06:29:54 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:37584 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727061AbeJQK3y (ORCPT ); Wed, 17 Oct 2018 06:29:54 -0400 Received: by mail-lf1-f66.google.com with SMTP id a82-v6so18583076lfa.4; Tue, 16 Oct 2018 19:36:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DpVyLpaYpKxn3MkItBlXIeWEUn9Iur/iIXy1OBbwJuI=; b=VuqOe47XJ8hw+8sS00TOj9l0/nbkwzw/TpLjXXFl03KEUNJvHkVxUm6juWhW7mownu VXU6Jmo2bfd7sPSoJ6iHmuJxK2tg/XuoR1QKxKFMBuoq4Bhr4JFqTgVrBMere8km3XHM Gz/1pTAPYujAh06z9Zsw175xDZyWgYgbP90f0ta8bGUmIux/ewQCaJ0WzCz2Z1hQW3E7 j54aZtuuYizuNoPcdC4CAO0by3teYgxNsvNY1b0RN4hFVGHswEPZlOrbhKzvNQfaZi7U aYWMtq4PE+h96RoT6OoTFd6uVeSSWrSMprytJ+5jbbSS3VmbVb/sPNFulVUdrlrT+eIL 3ahA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DpVyLpaYpKxn3MkItBlXIeWEUn9Iur/iIXy1OBbwJuI=; b=kuIFSeFJc+fOo/mdm8R5BFvyRaKgbusmvGRnRU51lSe82HOhP4KF8lkPU4DGVIt2iM QJZC9VUb8hVmeOzFCmWxWMIj3BElU7t0XZl82hrtzLtvZQzKAe2n2HiKa1IQyFVkbC7e 3g+qK6ph4z2COxSb8w4NbkFWwa5cK1QgyMXfNkvF4dj6WTTubE2PyFE6+k6QtwpnW6Ba 6yKjoI+0JHXq9a1CxeQ9+ZKclLU19+80SCGh7CMOax6CraDi69KZOPVSxCcOcAHCoelz Xj9ldR5BC5imRdhvs4jxObjXkAWrNLIdsrhiPJMX7KPyxiYdl9zprAaY7z9ug1exESwi 2vSQ== X-Gm-Message-State: ABuFfohFC8J8aIrxcEkcH3MtJCV5iEW2ydE5TcbaaXpdbL1uUIMRUxha 95qK5jx8YK+5PhEyf6EimXapFb2CXfbusPuPEn4= X-Received: by 2002:a19:d212:: with SMTP id j18-v6mr13918193lfg.44.1539743787960; Tue, 16 Oct 2018 19:36:27 -0700 (PDT) MIME-Version: 1.0 References: <1539677982-13762-1-git-send-email-zhang.chunyan@linaro.org> <88801a36-44cf-237f-a762-985bb215c104@intel.com> In-Reply-To: <88801a36-44cf-237f-a762-985bb215c104@intel.com> From: Chunyan Zhang Date: Wed, 17 Oct 2018 10:35:51 +0800 Message-ID: Subject: Re: [PATCH] mmc: sdhci: use goto rather than return directly To: Adrian Hunter Cc: Chunyan Zhang , Ulf Hansson , linux-mmc@vger.kernel.org, Linux Kernel Mailing List , linus.walleij@linaro.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 16 Oct 2018 at 16:30, Adrian Hunter wrote: > > On 16/10/18 11:19 AM, Chunyan Zhang wrote: > > The driver should clean resources requested in the function before > > unnormal return. > > > > CC: Linus Walleij > > Signed-off-by: Chunyan Zhang > > Fixes: bd9b902798ab ("mmc: sdhci: Implement an SDHCI-specific bounce buffer") > > --- > > drivers/mmc/host/sdhci.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c > > index 1b3fbd9..f6b57e1 100644 > > --- a/drivers/mmc/host/sdhci.c > > +++ b/drivers/mmc/host/sdhci.c > > @@ -3991,7 +3991,7 @@ int sdhci_setup_host(struct sdhci_host *host) > > /* This may alter mmc->*_blk_* parameters */ > > ret = sdhci_allocate_bounce_buffer(host); > > Do we need the error return? It seems to be zero always. Or we don't need to check 'ret' for now, right? > > > if (ret) > > - return ret; > > + goto unreg; > > } > > > > return 0; > > >