phy: qcom-qmp-combo: fix init-count imbalance
authorJohan Hovold <johan+linaro@kernel.org>
Tue, 2 May 2023 10:38:09 +0000 (12:38 +0200)
committerVinod Koul <vkoul@kernel.org>
Mon, 8 May 2023 09:09:42 +0000 (14:39 +0530)
commit9bf03a0cbd80a256bc1e1c4bcc80bc2b06b8b2b9
treebf0a96bd1253ce2bc2a635d7e7c3262b1d342a11
parentac9a78681b921877518763ba0e89202254349d1b
phy: qcom-qmp-combo: fix init-count imbalance

The init counter is not decremented on initialisation errors, which
prevents retrying initialisation and can lead to the runtime suspend
callback attempting to disable resources that have never been enabled.

Add the missing decrement on initialisation errors so that the counter
reflects the state of the device.

Fixes: e78f3d15e115 ("phy: qcom-qmp: new qmp phy driver for qcom-chipsets")
Cc: stable@vger.kernel.org # 4.12
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20230502103810.12061-2-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/qualcomm/phy-qcom-qmp-combo.c