[PATCH] video: s3c-fb: return proper error if clk_get fails

Subsystems: framebuffer layer, the rest

STALE5649d

2 messages, 2 authors, 2011-02-14 · open the first message on its own page

[PATCH] video: s3c-fb: return proper error if clk_get fails

From: Axel Lin <hidden>
Date: 2011-02-11 08:49:08

Return PTR_ERR(sfb->bus_clk) instead of 0 if clk_get fails.

Signed-off-by: Axel Lin <redacted>
---
 drivers/video/s3c-fb.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
index 83ce9a0..6817d18 100644
--- a/drivers/video/s3c-fb.c
+++ b/drivers/video/s3c-fb.c
@@ -1340,6 +1340,7 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev)
 	sfb->bus_clk = clk_get(dev, "lcd");
 	if (IS_ERR(sfb->bus_clk)) {
 		dev_err(dev, "failed to get bus clock\n");
+		ret = PTR_ERR(sfb->bus_clk);
 		goto err_sfb;
 	}
 
-- 
1.7.2


Re: [PATCH] video: s3c-fb: return proper error if clk_get fails

From: Kyungmin Park <hidden>
Date: 2011-02-14 00:19:25

Acked-by: Kyungmin Park <kyungmin.park@samsung.com>

On Fri, Feb 11, 2011 at 5:51 PM, Axel Lin [off-list ref] wrote:
quoted hunk
Return PTR_ERR(sfb->bus_clk) instead of 0 if clk_get fails.

Signed-off-by: Axel Lin <redacted>
---
 drivers/video/s3c-fb.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
index 83ce9a0..6817d18 100644
--- a/drivers/video/s3c-fb.c
+++ b/drivers/video/s3c-fb.c
@@ -1340,6 +1340,7 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev)
       sfb->bus_clk = clk_get(dev, "lcd");
       if (IS_ERR(sfb->bus_clk)) {
               dev_err(dev, "failed to get bus clock\n");
+               ret = PTR_ERR(sfb->bus_clk);
               goto err_sfb;
       }

--
1.7.2



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help