All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]  thermal: qcom: add missing put_device() call in init_common()
@ 2021-03-23  2:09 Jian Dong
  2021-05-26 19:03 ` patchwork-bot+linux-arm-msm
  0 siblings, 1 reply; 2+ messages in thread
From: Jian Dong @ 2021-03-23  2:09 UTC (permalink / raw)
  To: amitk, agross, bjorn.andersson
  Cc: rui.zhang, daniel.lezcano, linux-pm, linux-arm-msm, huyue2,
	Jian Dong

From: Jian Dong <dongjian@yulong.com>

 Fixes coccicheck ERROR:

 drivers/thermal/qcom/tsens.c:759:4-10: ERROR: missing put_device;
 call of_find_device_by_node on line 715, but without a corresponding
 object release within this function.

Signed-off-by: Jian Dong <dongjian@yulong.com>
---
 drivers/thermal/qcom/tsens.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
index d8ce3a6..3c4c051 100644
--- a/drivers/thermal/qcom/tsens.c
+++ b/drivers/thermal/qcom/tsens.c
@@ -755,8 +755,10 @@ int __init init_common(struct tsens_priv *priv)
 		for (i = VER_MAJOR; i <= VER_STEP; i++) {
 			priv->rf[i] = devm_regmap_field_alloc(dev, priv->srot_map,
 							      priv->fields[i]);
-			if (IS_ERR(priv->rf[i]))
-				return PTR_ERR(priv->rf[i]);
+			if (IS_ERR(priv->rf[i])) {
+				ret = PTR_ERR(priv->rf[i]);
+				goto err_put_device;
+			}
 		}
 		ret = regmap_field_read(priv->rf[VER_MINOR], &ver_minor);
 		if (ret)
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH]  thermal: qcom: add missing put_device() call in init_common()
  2021-03-23  2:09 [PATCH] thermal: qcom: add missing put_device() call in init_common() Jian Dong
@ 2021-05-26 19:03 ` patchwork-bot+linux-arm-msm
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+linux-arm-msm @ 2021-05-26 19:03 UTC (permalink / raw)
  To: Jian Dong; +Cc: linux-arm-msm

Hello:

This patch was applied to qcom/linux.git (refs/heads/for-next):

On Tue, 23 Mar 2021 10:09:47 +0800 you wrote:
> From: Jian Dong <dongjian@yulong.com>
> 
>  Fixes coccicheck ERROR:
> 
>  drivers/thermal/qcom/tsens.c:759:4-10: ERROR: missing put_device;
>  call of_find_device_by_node on line 715, but without a corresponding
>  object release within this function.
> 
> [...]

Here is the summary with links:
  - thermal: qcom: add missing put_device() call in init_common()
    https://git.kernel.org/qcom/c/f4136863e889

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-26 19:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-23  2:09 [PATCH] thermal: qcom: add missing put_device() call in init_common() Jian Dong
2021-05-26 19:03 ` patchwork-bot+linux-arm-msm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.