MLK-13741: video: mxsfb: unchecked return value
authorGuoniu.Zhou <guoniu.zhou@nxp.com>
Wed, 11 Jan 2017 06:42:02 +0000 (14:42 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:58:20 +0000 (14:58 -0500)
In overlayfb_enable(), unchecked the return value of lock_fb_info function, if
it return zero, it maybe cause mistakes.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
drivers/video/fbdev/mxsfb.c

index b00ba51..1b3be43 100644 (file)
@@ -1558,7 +1558,9 @@ static void overlayfb_enable(struct mxsfb_layer *ofb)
 {
        struct mxsfb_info *fbi = ofb->fbi;
 
-       lock_fb_info(fbi->fb_info);
+       if (!lock_fb_info(fbi->fb_info))
+               return;
+
        if (fbi->cur_blank == FB_BLANK_UNBLANK) {
                mxsfb_disable_controller(fbi->fb_info);
                writel(CTRL1_FIFO_CLEAR, fbi->base + LCDC_CTRL1 + REG_SET);