media: camif-core: Add check for clk_enable()
Subsystems (4)
PATCH 2/2 media: camif-core: Add check for clk_enable()
Add check for the return value of clk_enable() to gurantee the success.
--- .../media/platform/samsung/s3c-camif/camif-core.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
drivers/media/platform/samsung/s3c-camif/camif-core.c +11 -2
@@ -527,10 +527,19 @@ static void s3c_camif_remove(struct platform_device *pdev)static int s3c_camif_runtime_resume (struct device *dev) {struct camif_dev *camif =dev_get_drvdata (dev); +int ret; + + ret =clk_enable (camif->clock[CLK_GATE ]); +if (ret) +return ret; -clk_enable (camif->clock[CLK_GATE ]);/* null op on s3c244x */ -clk_enable (camif->clock[CLK_CAM ]); + ret =clk_enable (camif->clock[CLK_CAM ]); +if (ret) { +clk_disable (camif->clock[CLK_GATE ]); +return ret; + } +return 0 ; }
Signature · 1 line
2.25.1
PATCH RESEND v3 1/2 media: mipi-csis: Add check for clk_enable()
Add check for the return value of clk_enable() to gurantee the success.
---
Changelog:
v2 -> v3:
1. Correct alignment to match open parenthesis
v1 -> v2:
1. Power off the phy and disble regulators when clk_enable() fails.
2. Remove a redundant space before the label "unlock".
--- drivers/media/platform/samsung/exynos4-is/mipi-csis.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/media/platform/samsung/exynos4-is/mipi-csis.c +8 -2
@@ -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 ; }
Signature · 1 line
2.25.1
Krzysztof Kozlowski
maintainerQuoted 7 lines · Jiasheng Jiang
Add check for the return value of
clk_enable()to gurantee the success.Fixes babde1c243b2 ("[media] V4L: Add driver for S3C24XX/S3C64XX SoC series camera interface")Signed-off-by Jiasheng Jiang <[email protected]>--- .../media/platform/samsung/s3c-camif/camif-core.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
Nothing improved...
Best regards,
Krzysztof
Hi Krzysztof,
Quoted 11 lines · Krzysztof Kozlowski
Quoted 7 lines · Jiasheng Jiang
Add check for the return value of
clk_enable()to gurantee the success.Fixes babde1c243b2 ("[media] V4L: Add driver for S3C24XX/S3C64XX SoC series camera interface")Signed-off-by Jiasheng Jiang <[email protected]>--- .../media/platform/samsung/s3c-camif/camif-core.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)Nothing improved...
Sorry for the confusion. This series consists of two patches. Only "PATCH 1/2" has been modified, while "PATCH 2/2" remains unchanged. As a result, there is no changelog for "PATCH 2/2".
-Jiasheng
Krzysztof Kozlowski
maintainerQuoted 13 lines · Jiasheng Jiang
Hi Krzysztof,
Quoted 10 lines · Krzysztof Kozlowski
Quoted 7 lines · Jiasheng Jiang
Add check for the return value of
clk_enable()to gurantee the success.Fixes babde1c243b2 ("[media] V4L: Add driver for S3C24XX/S3C64XX SoC series camera interface")Signed-off-by Jiasheng Jiang <[email protected]>--- .../media/platform/samsung/s3c-camif/camif-core.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
Quoted 5 lines
Quoted 1 line
Nothing improved...
Sorry for the confusion. This series consists of two patches. Only "PATCH 1/2" has been modified, while "PATCH 2/2" remains unchanged. As a result, there is no changelog for "PATCH 2/2".
It is not correctly versioned. Version is per entire patchset, simply use b4 (or look how any other patchset is done via lore.kernel.org).
Best regards,
Krzysztof
Hi Krzysztof,
Quoted 15 lines · Krzysztof Kozlowski
Quoted 13 lines · Jiasheng Jiang
Hi Krzysztof,
Quoted 10 lines · Krzysztof Kozlowski
Quoted 7 lines · Jiasheng Jiang
Add check for the return value of
clk_enable()to gurantee the success.Fixes babde1c243b2 ("[media] V4L: Add driver for S3C24XX/S3C64XX SoC series camera interface")Signed-off-by Jiasheng Jiang <[email protected]>--- .../media/platform/samsung/s3c-camif/camif-core.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Nothing improved...
Sorry for the confusion. This series consists of two patches. Only "PATCH 1/2" has been modified, while "PATCH 2/2" remains unchanged. As a result, there is no changelog for "PATCH 2/2".
It is not correctly versioned. Version is per entire patchset, simply use b4 (or look how any other patchset is done via lore.kernel.org).
Thank you very much.
I have correctly versioned and resend the v3 patches.
-Jiasheng