提交 47276291 编写于 作者: G Guangqing Zhu 提交者: Zheng Zengkai

thermal/drivers/tsens: Fix missing put_device error

stable inclusion
from stable-5.10.38
commit 5d254e17ca86fb51d9e5030578636d8bb0649a60
bugzilla: 51875
CVE: NA

--------------------------------

[ Upstream commit f4136863 ]

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: a7ff8297 ("drivers: thermal: tsens: Merge tsens-common.c into tsens.c")
Signed-off-by: NGuangqing Zhu <zhuguangqing83@gmail.com>
Reviewed-by: NBjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20210404125431.12208-1-zhuguangqing83@gmail.comSigned-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 968e68d8
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册