Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2469840pxj; Mon, 10 May 2021 03:53:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzn5KRxOHA241qtsQOnIMr/+xa050cVrrD2dZwy8SWUQr0iWVPS1CBaNFGNU3eSOcCVOsK X-Received: by 2002:a92:c7a6:: with SMTP id f6mr20852243ilk.17.1620643989807; Mon, 10 May 2021 03:53:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620643989; cv=none; d=google.com; s=arc-20160816; b=lOTUjMxONtD0+9GUqHTRwN9v/nEYzQsD6Bzdhy+DrmU28zBTPVh1u+e4+1itoerL8p Q1Ek6v4nugKwbB5uM0aDYcx1sR/+J5+yIza9HW4M3mNfJU+EHjKMaogfoYE1iE7DnF04 aQt2xKyHzqK/oAhuYwJ7ef93412yjZ5oFQiBRgOOekhXoWm9Cft7vbpVzbX4tK4O9DD7 O2yHXxO/LsByWFchNWvsORH9TfZ3HDygkeBCfdQSDNmrWq3qnxLGeGM6oJP15xkyBpj+ h60Kuo2iyzlmVICsGy5+YQTNXSFKnF/ouABKBcVClcwFW2kHyTAmjktMkarfve/1+INl hp3g== 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=pVLBfsFlDGBZf+SEuoYkZGWEAyWYN668oD/7nlUzNuE=; b=f7w/bwjWhwVXGMxlj69ferYJHIVE+RD8n22RVbNAw+jFVqWpETCPpA0SCcfae+eUs6 1NLeEXEwS1SPVH0UxIn7nF5YHkMo3LBCx1XO5vvCIE7RiXizPkT6znBQldOpKPH+yEF+ cmGOs8w8xi+eNnrsniH7Kdocsdr5Nzf1dPmZAirhFmE4g9A/YMM1xfByaARYvIZai9Ap eeConE5JmzPfIRuHneqN5xftdeTTXapJ8gy7pIwpZ87eOlqpNFRkD37XOty/cSxUvXlr whqynPJMWFu7IjV0osoRiLBBV5hXbEbStfJ/ghAq6NrazYB8sAQmmsymWRB6s9RanRgF qfEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=H7EBeEEr; 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 d21si6731229jak.119.2021.05.10.03.52.57; Mon, 10 May 2021 03:53:09 -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=H7EBeEEr; 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 S231864AbhEJKw0 (ORCPT + 99 others); Mon, 10 May 2021 06:52:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:48330 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231681AbhEJKly (ORCPT ); Mon, 10 May 2021 06:41:54 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5BB1361975; Mon, 10 May 2021 10:32:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620642734; bh=qqlqCzerzvh1/3RjIAAAzj8A1mHi6ULH9C2BG+XgYeE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H7EBeEEr58jI6NhUQEtJjFv+Kai50G2NKqjkBbatgFTT5bawYt9wAmd2Yg/mwqgnf JnXztO16JruZuPZlA93GLDckgthNpkyIEYwC1b/oAa/8/oGNGOzrAyrcBnvCbzUlje SnjFqKEqjfOWy+DzI9UYZwJ4dB5qMDPjqCcJpAtg= 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 029/299] mmc: uniphier-sd: Fix a resource leak in the remove function Date: Mon, 10 May 2021 12:17:06 +0200 Message-Id: <20210510102005.810779049@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 e29c84857e2d51aa017ce04284b962742fb97d9e upstream. A 'tmio_mmc_host_free()' call is missing in the remove function, in order to balance a 'tmio_mmc_host_alloc()' call in the probe. This is done in the error handling path of the probe, but not in the remove function. 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/20210220142953.918608-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 | 1 + 1 file changed, 1 insertion(+) --- a/drivers/mmc/host/uniphier-sd.c +++ b/drivers/mmc/host/uniphier-sd.c @@ -661,6 +661,7 @@ static int uniphier_sd_remove(struct pla tmio_mmc_host_remove(host); uniphier_sd_clk_disable(host); + tmio_mmc_host_free(host); return 0; }