Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4885509imm; Tue, 16 Oct 2018 01:23:31 -0700 (PDT) X-Google-Smtp-Source: ACcGV62WcgUZ8nLmtL67NVay2cWfuvLl760gpr59AUsaNV/O8n98aCDziLi6kg5jHIlHM9X/kwzY X-Received: by 2002:a17:902:b492:: with SMTP id y18-v6mr20727212plr.254.1539678211189; Tue, 16 Oct 2018 01:23:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539678211; cv=none; d=google.com; s=arc-20160816; b=hvOzEgn51L7xl8wnChMTWEfAviR50FIMRDDKnMW2ds4ehYpDi+mqAcv9RfxQrUzWQ2 fA8gdco9S8DORhlQ06WyzDRl6Dxmiv1yG5SFFHMb3Zwdet/jcOQ8C2iI3+I7wLvoUxba RZCFP9jaNHOa2TpvgYiv9r/4sdQeEvd5DgiZaLcHPtGTULhPDqMoblgiDSVj/F0lC3NM nwOWwC8yoB5WehafPvFK4+w8zaWzWFlFktokxpHxi5SOe7xDntoCwlYytLsyJLVjhmGV pM0sIMlp+VW9HO6zpOVxp5hV6wkMdanH5wFhUpD4wTojuSG/JsnOiuVitQdmTOvKhk3C ZioA== 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=ESMmwG4lwI9UfDPntyUzjYZvUBdQIRJn/76PLMeWpWHHVbVqhwDw822VFGwEXj4CxJ 3uthc61lrpOIYXcZUwT0Pu+7F7532uGDr+XWFkzzUsPsL2wcrfTqZWo1n76120oOVPH6 SC6yZHFZPmiTDcUqJHQkXGSkhjmasnmM8GXuzjlwvHo0Mn2GiMrgkUxbv9+pKv6s7wiP FWyLg19NKbhHLWFGolgTIzzZT+pSUsDo3LVKN39zpVmTVI66FLNCvMJ+rv2wMLwG+1u2 Fq2tWFOEeLA7svHVRLJZdS2xUkqcWR2mvogt7Azt2+vTW1eQzslxoLZoSBe+ZHa8idmx BH+A== 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-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=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 r17-v6si13088612pgo.278.2018.10.16.01.21.15; Tue, 16 Oct 2018 01:23:31 -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=@linaro.org header.s=google header.b="FR8dIy/Q"; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726961AbeJPQJp (ORCPT + 99 others); Tue, 16 Oct 2018 12:09:45 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:41487 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726781AbeJPQJp (ORCPT ); Tue, 16 Oct 2018 12:09:45 -0400 Received: by mail-pl1-f196.google.com with SMTP id q17-v6so10637436plr.8 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=T6W9774gQRnK/NNXI1uK7dhZIkJsJvKB2rZKOIKEdy6HuWoh/31fUICfwbxP+rxBak TTIA+JN3782ANHfo4bdwMENrrRirxEvJ1AOSIDnz+ceb9zyU6Ls05B5ltQXADrjAi+Xv ++Tcu2CZ1rANmOfDy3hfWH06CjzZVDj3bhIzIHhUxHqekXRsMeG3FKqlUgCDTYwn0S+q zY9FG4/bGJ34Z/q0JgtaeN+8XGw4aXCJPKUFEOET790sN2AehSMlMkJE8VHYKlX6Un5j ce9WLMzYcm4bJUF1Z3+N5KGTBpB7A1hP+fupIxy2Uy3yI3piSFoeKbblVCegmEFicOBq jlxA== X-Gm-Message-State: ABuFfojGp0odVvJsmn2vcmNoZY7FRoVrs69ecCVkjwMuR6uIGd5B1SN6 r/otiVkpzs9rJI0lnsvIYIPnUw== 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(-) 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; -- 2.7.4