提交 6a938a8c 编写于 作者: R Ravindran, Madhusudhanan (M.) 提交者: Greg Kroah-Hartman

staging: fbtft: Fix potential null dereference

This error is found by smatch tool.
Signed-off-by: NMadhusudhanan Ravindran <mravindr@visteon.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 aa5735f1
......@@ -282,6 +282,9 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len)
signed short *convert_buf = kmalloc(par->info->var.xres *
par->info->var.yres * sizeof(signed short), GFP_NOIO);
if (!convert_buf)
return -ENOMEM;
fbtft_par_dbg(DEBUG_WRITE_VMEM, par, "%s()\n", __func__);
/* converting to grayscale16 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册