From 942b8d05cdf1da396b4449a38b87c677591947c0 Mon Sep 17 00:00:00 2001 From: axel lin Date: Fri, 11 Feb 2011 08:51:10 +0000 Subject: [PATCH] video: s3c-fb: return proper error if clk_get fails Return PTR_ERR(sfb->bus_clk) instead of 0 if clk_get fails. Signed-off-by: Axel Lin Acked-by: Kyungmin Park Signed-off-by: Paul Mundt --- drivers/video/s3c-fb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c index 83ce9a04d872..6817d187d46e 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; } -- GitLab