media: mipi-csis: Add check for clk_enable()

[ Upstream commit 125ad1aeec77eb55273b420be6894b284a01e4b6 ]

Add check for the return value of clk_enable() to gurantee the success.

Fixes: b5f1220d58 ("[media] v4l: Add v4l2 subdev driver for S5P/EXYNOS4 MIPI-CSI receivers")
Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Jiasheng Jiang
2024-11-25 19:18:18 +00:00
committed by Greg Kroah-Hartman
parent 8fdb29ab86
commit 0e00f92ccc

View File

@@ -940,13 +940,19 @@ static int s5pcsis_pm_resume(struct device *dev, bool runtime)
state->supplies); state->supplies);
goto unlock; goto unlock;
} }
clk_enable(state->clock[CSIS_CLK_GATE]); ret = clk_enable(state->clock[CSIS_CLK_GATE]);
if (ret) {
phy_power_off(state->phy);
regulator_bulk_disable(CSIS_NUM_SUPPLIES,
state->supplies);
goto unlock;
}
} }
if (state->flags & ST_STREAMING) if (state->flags & ST_STREAMING)
s5pcsis_start_stream(state); s5pcsis_start_stream(state);
state->flags &= ~ST_SUSPENDED; state->flags &= ~ST_SUSPENDED;
unlock: unlock:
mutex_unlock(&state->lock); mutex_unlock(&state->lock);
return ret ? -EAGAIN : 0; return ret ? -EAGAIN : 0;
} }