]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
drm/brige/megachips: Add checking if ge_b850v3_lvds_init() is working correctly
authorNadezda Lutovinova <lutovinova@ispras.ru>
Wed, 19 Aug 2020 14:37:56 +0000 (17:37 +0300)
committerStefan Bader <stefan.bader@canonical.com>
Thu, 10 Dec 2020 11:02:46 +0000 (12:02 +0100)
commit2c89c63b0a711ed7c8435cec1917efdea4814c77
treecd05f8c74383ccdb3d1db6b19dc9365f678bc4a6
parent2f350cfb9606e55aa5e2f90dd8fa83176a7166f9
drm/brige/megachips: Add checking if ge_b850v3_lvds_init() is working correctly

BugLink: https://bugs.launchpad.net/bugs/1904450
[ Upstream commit f688a345f0d7a6df4dd2aeca8e4f3c05e123a0ee ]

If ge_b850v3_lvds_init() does not allocate memory for ge_b850v3_lvds_ptr,
then a null pointer dereference is accessed.

The patch adds checking of the return value of ge_b850v3_lvds_init().

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Nadezda Lutovinova <lutovinova@ispras.ru>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200819143756.30626-1-lutovinova@ispras.ru
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: William Breathitt Gray <william.gray@canonical.com>
drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c