From patchwork Tue Oct 16 08:19:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chunyan Zhang X-Patchwork-Id: 148920 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp4784956lji; Tue, 16 Oct 2018 01:20:31 -0700 (PDT) X-Google-Smtp-Source: ACcGV60VUMf8u1dPUN472kQBskMiZYlYXhEGur1rRs04gJWnqKezMdhKj6DM2NZkN3PROpjIg412 X-Received: by 2002:a63:6385:: with SMTP id x127-v6mr19245036pgb.10.1539678031338; Tue, 16 Oct 2018 01:20:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539678031; cv=none; d=google.com; s=arc-20160816; b=D3CwPieV1rRtgRzPb0tOqAQ1i/lx6/fq70udZB/Rg7AvI4yXnKKlqU0riCkSlWEJvI yCyn1dCEF/WtipPP6jiyxzofIGTZ3czPr2T2dXCAzsUciKchC+gPXsNBd4IqCsjYdg6i vGmU82Jd/nocpYLoo3PPpm+WiDMRn2DbTO9mqGH6jB7VVKtMRQLAcLTHTIGlU0rYEmOe 6kJp5/yEheX2yk4VwPW2ESRbaS+JnIWYwHlLYc/fU8jqbn4KDTb9RLP3uW7vsyHBkxNS TiJCGPG+swwRIO1lHwfo0SN54trqV66BPHH6crEzHf+h4DizkdumMSaKHUf14mF5zbBm qxJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=zJeX9M/3WLf7vGzEgsrr2EwGJJddbgH/0Jo3NzAEVkc=; b=hg8QlZL2Y3S7JHjWayTyqYnZPLy7ADk6HlHYMl9/Kw6APTkwLPOolO1NA5EarBkP3A UtFU7/qpCQF6nyOZPFdSaCIU1+xf+gRF2RACdHqTJk6UOEIzV/kjueOdYO8dRiaUeYIS sfOih+sbfGhMx/vToYce0RJMO4W6UxYT7X1sC0fEQ9Gp0FSENxf2UGTqGdGgxRKsgN+j HPO/XbiS//akBu6C4g/dOMMMhhrHmHKbiBhTrHvHJRLJ1xSGY2FgCgF7Yl1DO64VS/+5 VZgfPQYGhDqiyAbR5HuI2klcTbTtsdnNxkIzcnOPcYSu6JW5MB8f2+um7tutDhgmwHp9 Cy3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="FR8dIy/Q"; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y73-v6si13632062pfi.61.2018.10.16.01.20.31; Tue, 16 Oct 2018 01:20:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-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=@linaro.org header.s=google header.b="FR8dIy/Q"; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726861AbeJPQJp (ORCPT + 5 others); Tue, 16 Oct 2018 12:09:45 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:34274 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726165AbeJPQJp (ORCPT ); Tue, 16 Oct 2018 12:09:45 -0400 Received: by mail-pl1-f195.google.com with SMTP id f18-v6so10641765plr.1 for ; Tue, 16 Oct 2018 01:20:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=zJeX9M/3WLf7vGzEgsrr2EwGJJddbgH/0Jo3NzAEVkc=; b=FR8dIy/Qmurw7MTf6m8nU9O7QMNlI9a9oHeV13rsi/wauahqAhLyzqc47iO4VU6WQN RE/8lbfSnYQKCBdPwBGD3ETpRs+1CFLCDlWGlKKPqIKsQHFYW5hpRb8PlqV13Vrti5n/ 0Vl8DrlfZ707oa8UVw/zcedPSJjVBDW/VEzbo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=zJeX9M/3WLf7vGzEgsrr2EwGJJddbgH/0Jo3NzAEVkc=; b=OnIBgGpqRbFtBYUTgLGzPlvwY4DQZC/E8frkEkPkaNQVPST2AbLL560RZaR7v71ZH1 nzdNYbyTruGVmyuvQ4FwT5GAlNs5Qu1Vpo1vd32OiwsPTziNJmWe0vtssW5f1yy8MEsU kRcvHu6q2NY6pmKHoAFaFrXLu4Wb9giIjawwaDCTnh/UMd+G8WkpNsI5/eHrf8tZwbBM gFjv9NVAmhdoDH5LJZQvKReVZVSnqJMruFncVl0Kd4qJ4e/yhKNMYL/rQl8wcWkvoPud Vy+TFXsF95GAfRtP2hHuMSYWD4gqosmNYYBLPsTnlxoEo5JKK3VU+Rm8NBtN3C0JzP98 INEA== X-Gm-Message-State: ABuFfoiocvIpMjkTliiSHR4C6VUfVRsPmYhd2GhgtSwXirb1KmzTFiDj To0KJbHXQVwVKU8/sCVckUnhvw== X-Received: by 2002:a17:902:bc49:: with SMTP id t9-v6mr20624403plz.210.1539678029651; Tue, 16 Oct 2018 01:20:29 -0700 (PDT) Received: from ubt.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id e131-v6sm20807868pfc.52.2018.10.16.01.20.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Oct 2018 01:20:28 -0700 (PDT) From: Chunyan Zhang To: Ulf Hansson , Adrian Hunter Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Linus Walleij , Chunyan Zhang Subject: [PATCH] mmc: sdhci: use goto rather than return directly Date: Tue, 16 Oct 2018 16:19:42 +0800 Message-Id: <1539677982-13762-1-git-send-email-zhang.chunyan@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org 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(-) -- 2.7.4 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); if (ret) - return ret; + goto unreg; } return 0;