Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2469782pxj; Mon, 10 May 2021 03:53:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymr5FvnIPeGFUBGA8xq8miq/aY1hm/ESfswjDFZYFuZ6oRPOPMOnZL0K9Lvo8l7/AqT8Al X-Received: by 2002:a05:6e02:92c:: with SMTP id o12mr21403213ilt.256.1620643984569; Mon, 10 May 2021 03:53:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620643984; cv=none; d=google.com; s=arc-20160816; b=BUpJOQZUG729/u295FOhwxXmVCImx3Js98BKXpyavUZtILPLQmzc03RsxzQ5pmEL0G lkAgCd07WHUiipC4o8KB1VQRzVkwFA37QlEnwRs5piMRAoaAl6uUnAGb2mmj0QDGAc7S wO+gA8EL75BSIGrFTuxeUxSIcQ2ocSdpJHz/y974dYeO81ua8LrX+sD7mNa9hx5f6aKN oqEf56tCMQWXEb4P4NhJmZcC0AWsXzeF98GvyIX5QbesLVeB9gXPFbLTl5JAXMdnljZL 0gJqZQoxu89PagH+nRyPV9GtS6gydUBriXb8lfpZz57Q9rNVCK0fGe1t8ZnYMQNqfaLb vG+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dqBxgxGorFvkmhwEsbjcGiV9zg6LavHiIEeCcmtppNA=; b=oOWO4hJ3DQFaQFV/XNqdEl72MXt2YwMHJ7z6JwhtJGko1ErSz1IlT54q927WaiiiK5 pUC0xwc0OXXTZjL6pwqjI85eapOaGM/63cewOTly24PgQmAr2i/6UBx9AdALLXU7AZKD 72IMx5RmGeaj4URtlxIpt5LHrQhwBnrbZ5cSXOrimDl6phxTlWT6M89TTS/+2gVdqg1d DLIRYetI3XWSnNzr4fXCGkCYG2dPiqR9i3MpYPl+7tpTZX6gPoWrRvC+mUJoj/huLbzp LWgWaFvf216uD1jvFOvxe2r0MX4AinJwQPxZsDuuBZOQa8AYqR0ndD0dcw93C3mxLK+7 6uNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vvJgWigT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o8si15167657ilu.133.2021.05.10.03.52.52; Mon, 10 May 2021 03:53:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vvJgWigT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230165AbhEJKwQ (ORCPT + 99 others); Mon, 10 May 2021 06:52:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:48344 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231959AbhEJKls (ORCPT ); Mon, 10 May 2021 06:41:48 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E178E6192D; Mon, 10 May 2021 10:32:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620642732; bh=bKHYduYXIORPsP879zxsL6tJ25IaGOmzF+jh+MzbEbA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vvJgWigTp5Hqg3HXGdIv1SFfkxtdWIeyZ/upQrrUGFqz9oipc4y+lUA8wXq6V5TFA Vdevcvj2Lp0XqgjBSstKnomYw8z4LTeKDoJSzehsajXGJqV8xRZq7W3/9RvqXDHyEo fGa7TpE21gYQDC2A9yLqSeQN0LLAvMbvoVfbMafY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , Masahiro Yamada , Ulf Hansson Subject: [PATCH 5.10 028/299] mmc: uniphier-sd: Fix an error handling path in uniphier_sd_probe() Date: Mon, 10 May 2021 12:17:05 +0200 Message-Id: <20210510102005.776824532@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210510102004.821838356@linuxfoundation.org> References: <20210510102004.821838356@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe JAILLET commit b03aec1c1f337dfdae44cdb0645ecac34208ae0a upstream. A 'uniphier_sd_clk_enable()' call should be balanced by a corresponding 'uniphier_sd_clk_disable()' call. This is done in the remove function, but not in the error handling path of the probe. Add the missing call. Fixes: 3fd784f745dd ("mmc: uniphier-sd: add UniPhier SD/eMMC controller driver") Signed-off-by: Christophe JAILLET Reviewed-by: Masahiro Yamada Link: https://lore.kernel.org/r/20210220142935.918554-1-christophe.jaillet@wanadoo.fr Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/host/uniphier-sd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/mmc/host/uniphier-sd.c +++ b/drivers/mmc/host/uniphier-sd.c @@ -636,7 +636,7 @@ static int uniphier_sd_probe(struct plat ret = tmio_mmc_host_probe(host); if (ret) - goto free_host; + goto disable_clk; ret = devm_request_irq(dev, irq, tmio_mmc_irq, IRQF_SHARED, dev_name(dev), host); @@ -647,6 +647,8 @@ static int uniphier_sd_probe(struct plat remove_host: tmio_mmc_host_remove(host); +disable_clk: + uniphier_sd_clk_disable(host); free_host: tmio_mmc_host_free(host);