Skip to content

Commit

Permalink
thermal/drivers/tsens: fix missing put_device error
Browse files Browse the repository at this point in the history
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: a7ff829 ("drivers: thermal: tsens: Merge tsens-common.c into
tsens.c")

Signed-off-by: Guangqing Zhu <zhuguangqing83@gmail.com>
  • Loading branch information
zhuguangqing authored and intel-lab-lkp committed Apr 4, 2021
1 parent 2023a53 commit 8c940b4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/thermal/qcom/tsens.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
ret = regmap_field_read(priv->rf[VER_MINOR], &ver_minor);
if (ret)
goto err_put_device;
Expand Down

0 comments on commit 8c940b4

Please sign in to comment.