Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5457484pxu; Tue, 22 Dec 2020 18:38:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJyqC+BNKhzJCyc+szv/JeCHMc4s3u73m5ZSYCkjV0u4v0TDV1ehLIcNMTOtX9IELCcw4hw+ X-Received: by 2002:a05:6402:212:: with SMTP id t18mr23140828edv.37.1608691116737; Tue, 22 Dec 2020 18:38:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608691116; cv=none; d=google.com; s=arc-20160816; b=Qhrt1EGFEXnfyEvA1PPCQVc75/146BF4QsOEyFIVW5HthRAWDk/DoECYXpnPWZmk/I x+rWU7GTg9WlLUe6E0iARPiC30epbuZSJr+NyFXVpjSndgeuZ2cCqtfBkXtO2q6QDxCn NE6u5D2L7oK4+I5lNuXl9utFWsMeelaAjTwdw9DbM7B5n+rWmaZkYQYcDUToaeQGfnHl +n72MiW+dYo2Xb+WQIDW2d9z+fe65nhJQhgbrfkpynyf87tK30pzFsV/jJ5M3wQPwLMR Xsxs5PpkqY9+fAKOKWtbCtAzGXpceheduOjKtPLppgC+pZSjoTwZ8hwCvBrVCc+9loWY IbQg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=i11fNkhq5H7d5Jfgsc532RWzSLJ9DqrC4uLJbjKwmsg=; b=Ktdl2XmvQonHcM38igiP9IxEZ+Et+GsNZjeN+cKMbzR/ukCmLn6CzCC6UA1MKEPX+D cRMissK94duztm7LZ6g13DNpuvHAkZtAniv5ERAbkrDBJnF07HfxUtCA4wQ7YvGMRAqV iz4Ar5x9jLbGy89S5ktIlBMHE6qJiKlWROifLvEOI21PdlVyIBE2vIJQe7TKWKZSDJ36 iY/nvVrjSvPh4luo4WcMUdLb1Kyum0jYtCz9JmGFV9r+itfjeh0WoH8AZC8PgSg2sTET pBQw/SUM6zUo76UIQEpDj9NFYxlEKLp+N22LAlaVdVS6WTGkyS0ggdYhi3ulIi21IdKE ePlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QRGRL2gT; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f8si11168547ejc.50.2020.12.22.18.38.14; Tue, 22 Dec 2020 18:38:36 -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=@kernel.org header.s=k20201202 header.b=QRGRL2gT; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729750AbgLWCiH (ORCPT + 99 others); Tue, 22 Dec 2020 21:38:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:52738 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728621AbgLWCYM (ORCPT ); Tue, 22 Dec 2020 21:24:12 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 69523233EF; Wed, 23 Dec 2020 02:23:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1608690237; bh=AdvCUUjEWCB+AlSRRlpc+0q1mOiMyNlVANWERmSuMF4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QRGRL2gTGfkpSPQI37Vy79+iENPDhYDOC1lts95BXld+nJpS8C72wxlQo8V2Bo4aY 4O8q7ikhCfcD4a+jMJeWfEymB6jE071coRZbvVbuOk+Cca58uAz89QjTT76jT0Hxgy KWKVDfZr4L/K1JFgeFDI024DlbNo3oVd9xjTNBUN4qPg2JqHcdGfuhQYyBDJ3EQph8 0a2usMOZqvTg/+Q9REdP5/S0XrSIK40lOo7EImJA5vqhd6gMsNvoyJXv8B0ZUog8FA 97vgXGQHU81vxm6DguoRKq9XbOqsroym5nGtFb6V+b1UCRbIPi6W0orklwGG7ouP9o Ki4OGeMnnmyLQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Qinglang Miao , Viresh Kumar , Sasha Levin , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH AUTOSEL 4.14 51/66] cpufreq: mediatek: add missing platform_driver_unregister() on error in mtk_cpufreq_driver_init Date: Tue, 22 Dec 2020 21:22:37 -0500 Message-Id: <20201223022253.2793452-51-sashal@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201223022253.2793452-1-sashal@kernel.org> References: <20201223022253.2793452-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Qinglang Miao [ Upstream commit 2f05c19d9ef4f5a42634f83bdb0db596ffc0dd30 ] Add the missing platform_driver_unregister() before return from mtk_cpufreq_driver_init in the error handling case when failed to register mtk-cpufreq platform device Signed-off-by: Qinglang Miao Signed-off-by: Viresh Kumar Signed-off-by: Sasha Levin --- drivers/cpufreq/mediatek-cpufreq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/cpufreq/mediatek-cpufreq.c b/drivers/cpufreq/mediatek-cpufreq.c index 18c4bd9a5c656..30af84b921130 100644 --- a/drivers/cpufreq/mediatek-cpufreq.c +++ b/drivers/cpufreq/mediatek-cpufreq.c @@ -614,6 +614,7 @@ static int __init mtk_cpufreq_driver_init(void) pdev = platform_device_register_simple("mtk-cpufreq", -1, NULL, 0); if (IS_ERR(pdev)) { pr_err("failed to register mtk-cpufreq platform device\n"); + platform_driver_unregister(&mtk_cpufreq_platdrv); return PTR_ERR(pdev); } -- 2.27.0