diff mbox series

[2/2] media: camif-core: Add check for clk_enable()

Message ID 20241123212624.6237-1-jiashengjiangcool@gmail.com
State Superseded
Headers show
Series [RESEND,v3,1/2] media: mipi-csis: Add check for clk_enable() | expand

Commit Message

Jiasheng Jiang Nov. 23, 2024, 9:26 p.m. UTC
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 <jiashengjiangcool@gmail.com>
---
 .../media/platform/samsung/s3c-camif/camif-core.c   | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

Comments

Krzysztof Kozlowski Nov. 24, 2024, 10:50 a.m. UTC | #1
On 23/11/2024 22:26, Jiasheng Jiang wrote:
> 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 <jiashengjiangcool@gmail.com>
> ---
>  .../media/platform/samsung/s3c-camif/camif-core.c   | 13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)

Nothing improved...

Best regards,
Krzysztof
Jiasheng Jiang Nov. 24, 2024, 9:10 p.m. UTC | #2
Hi Krzysztof,

On Sun, Nov 24, 2024 at 5:50 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On 23/11/2024 22:26, Jiasheng Jiang wrote:
> > 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 <jiashengjiangcool@gmail.com>
> > ---
> >  .../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 Nov. 25, 2024, 7:27 a.m. UTC | #3
On 24/11/2024 22:10, Jiasheng Jiang wrote:
> Hi Krzysztof,
> 
> On Sun, Nov 24, 2024 at 5:50 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>
>> On 23/11/2024 22:26, Jiasheng Jiang wrote:
>>> 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 <jiashengjiangcool@gmail.com>
>>> ---
>>>  .../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".
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
Jiasheng Jiang Nov. 25, 2024, 7:19 p.m. UTC | #4
Hi Krzysztof,

On Mon, Nov 25, 2024 at 2:27 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On 24/11/2024 22:10, Jiasheng Jiang wrote:
> > Hi Krzysztof,
> >
> > On Sun, Nov 24, 2024 at 5:50 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> >>
> >> On 23/11/2024 22:26, Jiasheng Jiang wrote:
> >>> 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 <jiashengjiangcool@gmail.com>
> >>> ---
> >>>  .../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".
> 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
diff mbox series

Patch

diff --git a/drivers/media/platform/samsung/s3c-camif/camif-core.c b/drivers/media/platform/samsung/s3c-camif/camif-core.c
index de6e8f151849..221e3c447f36 100644
--- a/drivers/media/platform/samsung/s3c-camif/camif-core.c
+++ b/drivers/media/platform/samsung/s3c-camif/camif-core.c
@@ -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;
 }