Skip to contentSkip to conversation

video: s3c-fb: return proper error if clk_get fails

PATCH In review Axel Lin 2 participants 2 messages Feb 11, 2011 – Feb 14, 2011 Framebuffer layer

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 video: s3c-fb: return proper error if clk_get fails

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

---
 drivers/video/s3c-fb.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/video/s3c-fb.c +1 -0
index 83ce9a0..6817d18 100644
@@ -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;
 	}
 
Signature · 1 line
1.7.2
Acked-by on v1 1/1
#1 lore raw
Quoted 30 lines · Axel Lin

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

---
 drivers/video/s3c-fb.c |    1 +

 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/video/s3c-fb.c +1 -1
index 83ce9a0..6817d18 100644
@@ -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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/