From nobody Fri Dec 19 18:14:12 2025 Received: from smtp.smtpout.orange.fr (smtp-25.smtpout.orange.fr [80.12.242.25]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 14D8B18BC36 for ; Sat, 29 Mar 2025 07:55:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.12.242.25 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743234914; cv=none; b=VCX4b9jJYIrtGiyPkZrEHSqvZX++qP+nkFYAjnoRQA52tvBruRh/D2wvBdctLID7lW8BkBYw7fGovovECS65wp/HjNgTUomUENsdqIuT0O609WKrJHirNAU3/yT2ukWg9UKgrVY9nFlISM4T4oE+B56MiFA6o4pgIAjbCnskRyc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743234914; c=relaxed/simple; bh=gdAiGcHA9ACA8gEU5ZV3breg3WLc8uWPyOoly+XVgws=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gp/j6DZfIEmYcXNXnmmzAqLryFkCI5UdfHWjHAf6lGkIAYCXJ1eubd9rDrttx80ABfRr7l2apfFNiMDGXFdvi1X1V+XDtDXctxhIpPKeASyj4K0HxQqSZ3Xq4Ae+stqbGdyrYH8SkuvN4/t29BPFEnHT8DezVaDxclxIJ+QtGFg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr; spf=pass smtp.mailfrom=wanadoo.fr; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b=a7IGOrxC; arc=none smtp.client-ip=80.12.242.25 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="a7IGOrxC" Received: from fedora.home ([90.11.132.44]) by smtp.orange.fr with ESMTPA id yQtAtsN3Ol9slyQtPteVWL; Sat, 29 Mar 2025 08:46:11 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1743234371; bh=lxG5GpmIEqwoUGwr9bKBwNL+mtU3l6sCszbqj7Kxf5k=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=a7IGOrxC3ED9Gj0NKMZBuUpb3nmtMAW5WTnV5xDlQida/pNILs6MYQAfcCUYl8jQM HfhLvVpPiVOa65RHj8V97d82otML7mK/Agj6jM1g/GbYix2BhHCk06AmNZ8ZS35N5E i0Dab7gM3eqHYuAHh0pQqEMy1EACDJ5TR0cGvsM2laAi16LGag3xSdGI5o8VZHs0ie dblxMUNIl8nkxDiCiftaPx+yCk1iz3XGYyl+xaym2Xr0XQxjy7grz0hFjFLpxsgIs2 LvU6T4Yfs1eeXMX1tRVZeX1eq849X2xJbjUH8TVGamh+KvvSL4s/mHXcYiD4Duknyr ALJWB3QkNN4OA== X-ME-Helo: fedora.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sat, 29 Mar 2025 08:46:11 +0100 X-ME-IP: 90.11.132.44 From: Christophe JAILLET To: lee@kernel.org, krzk@kernel.org, alim.akhtar@samsung.com, s.nawrocki@samsung.com, beomho.seo@samsung.com, ideal.song@samsung.com Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH 1/4] mfd: exynos-lpass: Fix an error handling path in exynos_lpass_probe() Date: Sat, 29 Mar 2025 08:45:45 +0100 Message-ID: X-Mailer: git-send-email 2.49.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" If an error occurs after a successful regmap_init_mmio(), regmap_exit() should be called as already done in the .remove() function. Switch to devm_regmap_init_mmio() to avoid the leak and simplify the .remove() function. Fixes: c695abab2429 ("mfd: Add Samsung Exynos Low Power Audio Subsystem dri= ver") Signed-off-by: Christophe JAILLET Reviewed-by: Krzysztof Kozlowski --- The .remove function was added in commit c414df12bdf7 ("mfd: exynos-lpass: Add missing remove() function") Compile tested only. --- drivers/mfd/exynos-lpass.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mfd/exynos-lpass.c b/drivers/mfd/exynos-lpass.c index 6a585173230b..6b95927e99be 100644 --- a/drivers/mfd/exynos-lpass.c +++ b/drivers/mfd/exynos-lpass.c @@ -122,8 +122,8 @@ static int exynos_lpass_probe(struct platform_device *p= dev) if (IS_ERR(lpass->sfr0_clk)) return PTR_ERR(lpass->sfr0_clk); =20 - lpass->top =3D regmap_init_mmio(dev, base_top, - &exynos_lpass_reg_conf); + lpass->top =3D devm_regmap_init_mmio(dev, base_top, + &exynos_lpass_reg_conf); if (IS_ERR(lpass->top)) { dev_err(dev, "LPASS top regmap initialization failed\n"); return PTR_ERR(lpass->top); @@ -145,7 +145,6 @@ static void exynos_lpass_remove(struct platform_device = *pdev) pm_runtime_disable(&pdev->dev); if (!pm_runtime_status_suspended(&pdev->dev)) exynos_lpass_disable(lpass); - regmap_exit(lpass->top); } =20 static int __maybe_unused exynos_lpass_suspend(struct device *dev) --=20 2.49.0 From nobody Fri Dec 19 18:14:12 2025 Received: from smtp.smtpout.orange.fr (smtp-25.smtpout.orange.fr [80.12.242.25]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1568918871F for ; Sat, 29 Mar 2025 07:47:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.12.242.25 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743234439; cv=none; b=Z9sUDgS7T9LkC0xw63shQ79h1oAFxc9FvhCkVrKJbA3vcryb7ZlI8u/MpObMASU6qjD7g1OHG7ycHFNcuenK5SApAgZvCvxXp9n8rXVem/wChVlZnIO0E/FCEZy7kaBzLHA+PermFl6Nsm6kV+YNsQSnMGlD4hvJDTCByFvH1e0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743234439; c=relaxed/simple; bh=m8V0vELosjMEi2lRQu+v2yxrgQPQu+IsVPQcDAhIlyY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Okheqb02Xhk7L5cmvgU1tvo4eEf4lQEcTaB9NssqiPS/kfv8S1UYLPG7XtsTGqw454XOgT6IlfBL72Kch4IvSZR2tF5MTue+ID2S5J2or6Qj4euSR8/voXvEh2iZ+NGMcQd8U+lchy5JNjt8y0ibPtKjnKAzWYHrsh+HNjkw13k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr; spf=pass smtp.mailfrom=wanadoo.fr; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b=sMjhG3sp; arc=none smtp.client-ip=80.12.242.25 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="sMjhG3sp" Received: from fedora.home ([90.11.132.44]) by smtp.orange.fr with ESMTPA id yQtAtsN3Ol9slyQtWteVbm; Sat, 29 Mar 2025 08:46:18 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1743234378; bh=4LCH57c1dhGxYdF7fm0yxki2rBXjTc81wlG/k7Z0uK0=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=sMjhG3spoP5M9YlmLwCgPiXoJqJF1CR7rIox5NYC/4EAvamy48n3GDFo9h18XDntW qy7VzK5ylsU0Tgjhy6IibuKBn4NXsA6b9RfJbttybLasOH2IzcVRpuA5sMfTcdkv7w Rfo/OH0yvtZskUtmdzpPYFx61DbhilXCGa1+oTl5ZvKzPkor9hqFabVo+FLkQNPMre AIL9J2zw3o2rtOLUna0p8pwbcAVVskCpFRkLItryc89W3ocu49ZockyT533meijGV7 teWA6pB+UaO1DIX5HyLjL2w19nvUC38ztb9whV9ZAWHIQqO+yPRmgQhnShsCu00xB9 JGzzFin6gEStw== X-ME-Helo: fedora.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sat, 29 Mar 2025 08:46:18 +0100 X-ME-IP: 90.11.132.44 From: Christophe JAILLET To: lee@kernel.org, krzk@kernel.org, alim.akhtar@samsung.com, s.nawrocki@samsung.com, beomho.seo@samsung.com, ideal.song@samsung.com Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH 2/4] mfd: exynos-lpass: Avoid calling exynos_lpass_disable() twice in exynos_lpass_remove() Date: Sat, 29 Mar 2025 08:45:46 +0100 Message-ID: X-Mailer: git-send-email 2.49.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" exynos_lpass_disable() is called twice in the remove function. Remove one of these calls. Fixes: 90f447170c6f ("mfd: exynos-lpass: Add runtime PM support") Signed-off-by: Christophe JAILLET Reviewed-by: Krzysztof Kozlowski --- Compile tested only. --- drivers/mfd/exynos-lpass.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/mfd/exynos-lpass.c b/drivers/mfd/exynos-lpass.c index 6b95927e99be..a2785ceea8bf 100644 --- a/drivers/mfd/exynos-lpass.c +++ b/drivers/mfd/exynos-lpass.c @@ -141,7 +141,6 @@ static void exynos_lpass_remove(struct platform_device = *pdev) { struct exynos_lpass *lpass =3D platform_get_drvdata(pdev); =20 - exynos_lpass_disable(lpass); pm_runtime_disable(&pdev->dev); if (!pm_runtime_status_suspended(&pdev->dev)) exynos_lpass_disable(lpass); --=20 2.49.0 From nobody Fri Dec 19 18:14:12 2025 Received: from smtp.smtpout.orange.fr (smtp-25.smtpout.orange.fr [80.12.242.25]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1618F179A7 for ; Sat, 29 Mar 2025 07:55:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.12.242.25 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743234903; cv=none; b=FEHqzTv6+YBv0szWJGbCyv1v+RLqloq6idtSihksmOzzyaUK46b2TTRd2avd6SI6G970L4P6bCkjRNVOIrK2ccZnacNrKnLUug5rgt6bSEYqO9jwUsZ11IgonoRc/DPS3C1cXpR3SjDkWOtyxMDx34sV3Fk53PVteoovi7Uz4vg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743234903; c=relaxed/simple; bh=hlhm6x1Iba11hQIC2ruSqILP/CL0rPLRG6ghhSeB+Tg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AR0ABetVYt8/18JByzvT3AgKXlTLbjJxzamzIzhrYrSHl/kd55iVCqF0e0q9qhQhEamM6kSMLUcDsba5tXv1buFVLJd8+RG3ZdztogSSo1/ZmdndqL6+KyNkZXtYh5yKy37ESQwNGr3sP/fbHSKZIsRoAwwOnvGSwv/GVtcrAXU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr; spf=pass smtp.mailfrom=wanadoo.fr; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b=toNjNc9z; arc=none smtp.client-ip=80.12.242.25 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="toNjNc9z" Received: from fedora.home ([90.11.132.44]) by smtp.orange.fr with ESMTPA id yQtAtsN3Ol9slyQtateVht; Sat, 29 Mar 2025 08:46:22 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1743234382; bh=KNdM5ts0wg1oqDwj15hlgi9Z0FrXnMRdaahatqUkprE=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=toNjNc9z8A13w9pHBhyEt10kmMSCVLOwaRh8sQqF0KYujLm1+4+ltUK4HTV9XFkrj UN4Li0VoUiMJ/noc5zosYfrUn6njUPMRx7/d57sQ3WY57/tPnN8LfvYv0v/5W2OHJH MUAIhS6t8WH6wQmD3FAs12yYUtIMx1RqJ4b1yzVseCkZ04ymljsucsUyZo9gHY2WQZ aLk+9hoAuv/JmNQqTddLhoNqrI5bnraOaoT5I72SkRVlFpp99pb2ACnpjYJcjcNXl4 jc8siBqdnbwKPXdEB5PHr4j76eOE81PZOoNv5vUR+dx0bzcgtbOtx16rk+lgKJ87sP oOnJcRteUfvhw== X-ME-Helo: fedora.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sat, 29 Mar 2025 08:46:22 +0100 X-ME-IP: 90.11.132.44 From: Christophe JAILLET To: lee@kernel.org, krzk@kernel.org, alim.akhtar@samsung.com, s.nawrocki@samsung.com, beomho.seo@samsung.com, ideal.song@samsung.com Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH 3/4] mfd: exynos-lpass: Move exynos_lpass_remove() Date: Sat, 29 Mar 2025 08:45:47 +0100 Message-ID: <1de670e6b9fa33cb81a34e5f882e79b80e479490.1743231856.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" In order be able to call exynos_lpass_remove() from the error handling path of the probe, it first needs to be moved before the probe. Signed-off-by: Christophe JAILLET --- drivers/mfd/exynos-lpass.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/mfd/exynos-lpass.c b/drivers/mfd/exynos-lpass.c index a2785ceea8bf..7fd8585ba35a 100644 --- a/drivers/mfd/exynos-lpass.c +++ b/drivers/mfd/exynos-lpass.c @@ -104,6 +104,15 @@ static const struct regmap_config exynos_lpass_reg_con= f =3D { .fast_io =3D true, }; =20 +static void exynos_lpass_remove(struct platform_device *pdev) +{ + struct exynos_lpass *lpass =3D platform_get_drvdata(pdev); + + pm_runtime_disable(&pdev->dev); + if (!pm_runtime_status_suspended(&pdev->dev)) + exynos_lpass_disable(lpass); +} + static int exynos_lpass_probe(struct platform_device *pdev) { struct device *dev =3D &pdev->dev; @@ -137,15 +146,6 @@ static int exynos_lpass_probe(struct platform_device *= pdev) return devm_of_platform_populate(dev); } =20 -static void exynos_lpass_remove(struct platform_device *pdev) -{ - struct exynos_lpass *lpass =3D platform_get_drvdata(pdev); - - pm_runtime_disable(&pdev->dev); - if (!pm_runtime_status_suspended(&pdev->dev)) - exynos_lpass_disable(lpass); -} - static int __maybe_unused exynos_lpass_suspend(struct device *dev) { struct exynos_lpass *lpass =3D dev_get_drvdata(dev); --=20 2.49.0 From nobody Fri Dec 19 18:14:12 2025 Received: from smtp.smtpout.orange.fr (smtp-26.smtpout.orange.fr [80.12.242.26]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B399E18BC36 for ; Sat, 29 Mar 2025 07:55:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.12.242.26 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743234940; cv=none; b=X0aI2MKnltzrdWaFoE/eveWvLOaLWaZF90wlYH8KHrfEfQO6LVU5A8eU2UiFrBiBepgOSglgNostH9L/aUI5ga28wZ5UItmKxB7f0QY5fjkqA92U5yP0k5v3J+ObgoLKfIbBYw9nNesl2Tw9lJf1zwuEzRMzOues0iSPB3QWh2w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743234940; c=relaxed/simple; bh=duZT+wz2v9SXSXUndHbCY9Wa4VglcZG5ovPv+XecIc0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ftJfs4Byooi75viNhDllYnrzpLNY/eSzzsFFyP6vOeBdosC1a0IFRXzv6eqgYGr6d9TP7B4r0ch0XCv+Q2h+U2jK85eXc/hoYOsA7xRlLp9f3UxgPmbG/2hzrYXg2ChLxQElSmZBIeh7YTK8nrD6fTxrCAN9vEGAzlJT27I4oOU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr; spf=pass smtp.mailfrom=wanadoo.fr; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b=gMqSk2Sb; arc=none smtp.client-ip=80.12.242.26 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="gMqSk2Sb" Received: from fedora.home ([90.11.132.44]) by smtp.orange.fr with ESMTPA id yQtAtsN3Ol9slyQtbteVkC; Sat, 29 Mar 2025 08:46:23 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1743234384; bh=388xrznfvx3yUimg5kNws/DNZuCQE1j80sB1rbo3xPc=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=gMqSk2Sb96QmihcEfm2HH+vPYGVUcku53uvdvYXABZH++CMEHLYHCGS41nAOtVnnx hdyCnNSeMgSTKbDo0nmbONgBqUrLnruKolB7Coxuy+XgG4J0Csg1vAd7+ll5rte7hI DIXcQva1JvEQL8EjYqZiP80ZnqjZa/sf3rFqMCZZ0IxAYheyrfpOTNXxe81LbG/LE7 Te4kQ0JvtSWczjdjEoFS3qzrlVba4EXxKUgoj53l71j3b5KwrSpCi2AhIjqczF7C2H YF9yRqYzzb5RaMTSgWtnZ+l0N0vZFBVGc0uNLf/91tG0HuMbKEZMSnG/Dr44kf5Mti YujWgPBiN4FMw== X-ME-Helo: fedora.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sat, 29 Mar 2025 08:46:24 +0100 X-ME-IP: 90.11.132.44 From: Christophe JAILLET To: lee@kernel.org, krzk@kernel.org, alim.akhtar@samsung.com, s.nawrocki@samsung.com, beomho.seo@samsung.com, ideal.song@samsung.com Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH 4/4] mfd: exynos-lpass: Fix another error handling path in exynos_lpass_probe() Date: Sat, 29 Mar 2025 08:45:48 +0100 Message-ID: X-Mailer: git-send-email 2.49.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" If devm_of_platform_populate() fails, some clean-up needs to be done, as already done in the remove function. Add the needed error handling path. Fixes: c695abab2429 ("mfd: Add Samsung Exynos Low Power Audio Subsystem dri= ver") Signed-off-by: Christophe JAILLET --- Compile tested only. --- drivers/mfd/exynos-lpass.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/exynos-lpass.c b/drivers/mfd/exynos-lpass.c index 7fd8585ba35a..9f2601e4e583 100644 --- a/drivers/mfd/exynos-lpass.c +++ b/drivers/mfd/exynos-lpass.c @@ -118,6 +118,7 @@ static int exynos_lpass_probe(struct platform_device *p= dev) struct device *dev =3D &pdev->dev; struct exynos_lpass *lpass; void __iomem *base_top; + int ret; =20 lpass =3D devm_kzalloc(dev, sizeof(*lpass), GFP_KERNEL); if (!lpass) @@ -143,7 +144,15 @@ static int exynos_lpass_probe(struct platform_device *= pdev) pm_runtime_enable(dev); exynos_lpass_enable(lpass); =20 - return devm_of_platform_populate(dev); + ret =3D devm_of_platform_populate(dev); + if (ret) + goto err_remove_exynos_lpass; + + return 0; + +err_remove_exynos_lpass: + exynos_lpass_remove(pdev); + return ret; } =20 static int __maybe_unused exynos_lpass_suspend(struct device *dev) --=20 2.49.0