Commit f4029844 authored by YueHaibing's avatar YueHaibing Committed by Bartlomiej Zolnierkiewicz

video: fbdev: Fix potential NULL pointer dereference

There is a potential NULL pointer dereference in case
fb_create_modedb() fails and returns NULL.
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
parent 10993504
......@@ -978,6 +978,8 @@ void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs)
get_monspecs(edid, specs);
specs->modedb = fb_create_modedb(edid, &specs->modedb_len, specs);
if (!specs->modedb)
return;
/*
* Workaround for buggy EDIDs that sets that the first
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment