[PATCH 3/4] video/stm: don't fail when the pixel clock is properly set

Eric Bénard eric at eukrea.com
Tue Sep 10 13:13:33 EDT 2013


the check is wrong as when the clock rate is correctly set
the function will return 0.

Signed-off-by: Eric Bénard <eric at eukrea.com>
---
 drivers/video/stm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/stm.c b/drivers/video/stm.c
index 0875c9b..2603129 100644
--- a/drivers/video/stm.c
+++ b/drivers/video/stm.c
@@ -331,7 +331,7 @@ static int stmfb_activate_var(struct fb_info *fb_info)
 	/** @todo ensure HCLK is active at this point of time! */
 
 	size = clk_set_rate(fbi->clk, PICOS2KHZ(mode->pixclock) * 1000);
-	if (size == 0) {
+	if (size != 0) {
 		dev_dbg(fbi->hw_dev, "Unable to set a valid pixel clock\n");
 		return -EINVAL;
 	}
-- 
1.8.3.1




More information about the barebox mailing list