projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
92ad83b
)
rk fb: do something when user set invalid config
author
hjc
<hjc@rock-chips.com>
Mon, 13 Apr 2015 03:13:32 +0000
(11:13 +0800)
committer
hjc
<hjc@rock-chips.com>
Sat, 9 May 2015 07:09:06 +0000
(15:09 +0800)
Signed-off-by: hjc <hjc@rock-chips.com>
drivers/video/rockchip/rk_fb.c
patch
|
blob
|
history
diff --git
a/drivers/video/rockchip/rk_fb.c
b/drivers/video/rockchip/rk_fb.c
index 53804baaa5b51a40fab7c7401e1cce4f95a48ab3..f9f4936a68380775e2efaa9081bd4a15a0fa7ffe 100644
(file)
--- a/
drivers/video/rockchip/rk_fb.c
+++ b/
drivers/video/rockchip/rk_fb.c
@@
-2196,6
+2196,9
@@
static int rk_fb_set_win_config(struct fb_info *info,
}
}
+ if (regs->win_num <= 0)
+ goto err_null_frame;
+
mutex_lock(&dev_drv->output_lock);
dev_drv->timeline_max++;
@@
-2266,6
+2269,13
@@
static int rk_fb_set_win_config(struct fb_info *info,
err:
mutex_unlock(&dev_drv->output_lock);
return ret;
+err_null_frame:
+ kfree(regs);
+ for (j = 0; j < RK_MAX_BUF_NUM; j++)
+ win_data->rel_fence_fd[j] = -1;
+ win_data->ret_fence_fd = -1;
+ pr_info("win num = %d,null frame\n", regs->win_num);
+ return 0;
}
#if 1