diff options
| author | Jiasheng Jiang <jiashengjiangcool@gmail.com> | 2024-11-25 19:18:18 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-02-08 09:57:53 +0100 |
| commit | 406e62371d09ccf5caaba7b71f818451d0cce4ef (patch) | |
| tree | 2c3aab77bb7eb6f4aa731271c9efd64f83a63a1f /drivers/media | |
| parent | c227d973812b69d24bb1375bad45eb7aa19daa32 (diff) | |
| download | linux-406e62371d09ccf5caaba7b71f818451d0cce4ef.tar.gz linux-406e62371d09ccf5caaba7b71f818451d0cce4ef.tar.bz2 linux-406e62371d09ccf5caaba7b71f818451d0cce4ef.zip | |
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: b5f1220d587d ("[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>
Diffstat (limited to 'drivers/media')
| -rw-r--r-- | drivers/media/platform/samsung/exynos4-is/mipi-csis.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/media/platform/samsung/exynos4-is/mipi-csis.c b/drivers/media/platform/samsung/exynos4-is/mipi-csis.c index 4b9b20ba3504..38c5f22b850b 100644 --- a/drivers/media/platform/samsung/exynos4-is/mipi-csis.c +++ b/drivers/media/platform/samsung/exynos4-is/mipi-csis.c @@ -940,13 +940,19 @@ static int s5pcsis_pm_resume(struct device *dev, bool runtime) state->supplies); 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) s5pcsis_start_stream(state); state->flags &= ~ST_SUSPENDED; - unlock: +unlock: mutex_unlock(&state->lock); return ret ? -EAGAIN : 0; } |
