Skip to content

Commit

Permalink
i2c: rcar: call pm_runtime_put() only if it has ID_P_PM_BLOCKED
Browse files Browse the repository at this point in the history
ID_P_PM_BLOCKED is controlling PM status.
We need to check it for pm_runtime_put() on rcar_i2c_probe(),
otherwise duplicate put.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
  • Loading branch information
morimoto committed Apr 15, 2022
1 parent 8cd7bc5 commit 088237f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/i2c/busses/i2c-rcar.c
Expand Up @@ -1121,7 +1121,8 @@ static int rcar_i2c_probe(struct platform_device *pdev)
out_del_device:
i2c_del_adapter(&priv->adap);
out_pm_put:
pm_runtime_put(dev);
if (priv->flags & ID_P_PM_BLOCKED)
pm_runtime_put(dev);
out_pm_disable:
pm_runtime_disable(dev);
return ret;
Expand Down

0 comments on commit 088237f

Please sign in to comment.