[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJKOXPcCiMCNKmP5TCLk9-qCJ=c4qP59Jr3B1sBZfxTqe4FuAw@mail.gmail.com>
Date: Fri, 16 Apr 2021 11:00:21 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: zhuguangqing83@...il.com
Cc: Amit Kucheria <amitk@...nel.org>, Andy Gross <agross@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Zhang Rui <rui.zhang@...el.com>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
linux-pm@...r.kernel.org, linux-arm-msm@...r.kernel.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] thermal/drivers/tsens: fix missing put_device error
On Sun, 4 Apr 2021 at 06:34, <zhuguangqing83@...il.com> wrote:
>
> From: Guangqing Zhu <zhuguangqing83@...il.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.
>
> Fixes: a7ff82976122 ("drivers: thermal: tsens: Merge tsens-common.c into
> tsens.c")
>
> Signed-off-by: Guangqing Zhu <zhuguangqing83@...il.com>
> ---
> drivers/thermal/qcom/tsens.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
> index d8ce3a687b80..cc4c6a9853a4 100644
> --- a/drivers/thermal/qcom/tsens.c
> +++ b/drivers/thermal/qcom/tsens.c
> @@ -755,9 +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;
> + }
As kbuild robot pointed out - this does not even compile. Please at
least build all your patches before sending.
Best regards,
Krzysztof
Powered by blists - more mailing lists