Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3516448pxb; Mon, 1 Mar 2021 12:02:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJyEQUxnkLXugrC64zVwMtGe7TR8UXNrjG7YKwDTor1kqjdv4ygCBatCeNnobwFnctmKDyss X-Received: by 2002:a17:906:f912:: with SMTP id lc18mr16295754ejb.159.1614628972692; Mon, 01 Mar 2021 12:02:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614628972; cv=none; d=google.com; s=arc-20160816; b=W4I6CiPBFJBIduUOnFkRe1tOkYotz7ceYp4Hz8Xm5uVXPUVR2l1Y/ldparkyxkql/7 9KKB9mLc9xkE0rs1Be1dyxp8yhm2j0wZyAn2o0zvhG19OQleYgBmtlwNx3chct16cquc SWUY1FpQVE6Xbcqn+YHSazfrN+T9xwyLBP2Y8rukzG7W4Dy2OtXGvH+ERTnMatKVDzSV RidkUVnxlnVOqe7PhdfXSY6o98UCDnhIDRJBBAZMSkN1fsHr5v1ibPKlVifJonE6Tu/G 9S7Rs2q+E63EUK1+ct+WvvNjagKKW1OV8uc/+mmdWva9l4fTk1vPcld0wmVdiBtIbJZq lscA== 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=evaQNKvDzQLQKWsOYgktNkGe15eiANOUhK+Xfl9EZqc=; b=q+4Tq5I+lj9G4a0ZMGaCSg8/mpjigwv5ivqMyaAtxybRW8/xwMaIiTDt9iDtItCvYF 1w/X/WUIGLooyedR482cAufL6/GWfTqhquO3xNqIzbO+QzK+9aLYc/kD+fosE87/Bedn n6ZMvXbIlusnji3ey28aUoAcKHzxVgFeu4qFU80qbQnD6VCYoyWkLcRba2JnGpYquxpE NlBLKQV1yBDCrd558BoMncm7ISPRdp0Gj2nhq01HZBJWLUp4N9Zl4bS6NK46n7t+hzTW 9C5DQGa1ZFfkbjSgGTtkAU2Cvn6Jzob9bTxrrmZw9RXNI5VV82dNCiOfTgA6nOkZener J8IQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=W+VFlCjT; 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 j16si3531700edw.292.2021.03.01.12.02.21; Mon, 01 Mar 2021 12:02:52 -0800 (PST) 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=W+VFlCjT; 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 S241513AbhCAUAP (ORCPT + 99 others); Mon, 1 Mar 2021 15:00:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:55906 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236681AbhCAQ6g (ORCPT ); Mon, 1 Mar 2021 11:58:36 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id CE9B264FDF; Mon, 1 Mar 2021 16:37:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614616626; bh=hakMxTD3W4MSZK40mEvtMtBQom0lgn5VXOlBPRG8f1g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W+VFlCjTcGxmKmtn6vCb5U0Br+ipvRNCZgM1G5T6LdrIOqmNk3zda2zm8y3zUUKZ1 cBEf6z2KChfDhRqhtJHhxp5BjhKru2jCx2hS53QsgubPqX4fNUm+T6+E7r3K9TEVAD 2q+p6kuOulih8oojhAxJ1Pk/KwbhLGKGZ50UjDvQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , Viresh Kumar , Sasha Levin Subject: [PATCH 4.19 040/247] cpufreq: brcmstb-avs-cpufreq: Fix resource leaks in ->remove() Date: Mon, 1 Mar 2021 17:11:00 +0100 Message-Id: <20210301161033.645765924@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161031.684018251@linuxfoundation.org> References: <20210301161031.684018251@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 [ Upstream commit 3657f729b6fb5f2c0bf693742de2dcd49c572aa1 ] If 'cpufreq_unregister_driver()' fails, just WARN and continue, so that other resources are freed. Fixes: de322e085995 ("cpufreq: brcmstb-avs-cpufreq: AVS CPUfreq driver for Broadcom STB SoCs") Signed-off-by: Christophe JAILLET [ Viresh: Updated Subject ] Signed-off-by: Viresh Kumar Signed-off-by: Sasha Levin --- drivers/cpufreq/brcmstb-avs-cpufreq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/cpufreq/brcmstb-avs-cpufreq.c b/drivers/cpufreq/brcmstb-avs-cpufreq.c index 1514c9846c5d5..a3c82f530d608 100644 --- a/drivers/cpufreq/brcmstb-avs-cpufreq.c +++ b/drivers/cpufreq/brcmstb-avs-cpufreq.c @@ -723,8 +723,7 @@ static int brcm_avs_cpufreq_remove(struct platform_device *pdev) int ret; ret = cpufreq_unregister_driver(&brcm_avs_driver); - if (ret) - return ret; + WARN_ON(ret); brcm_avs_prepare_uninit(pdev); -- 2.27.0