]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
drm/fb-helper: Fix potential NULL pointer dereference
authorGustavo A. R. Silva <garsilva@embeddedor.com>
Tue, 5 Dec 2017 17:46:28 +0000 (11:46 -0600)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 6 Dec 2017 20:45:28 +0000 (21:45 +0100)
commit89f3f35620c7f244880485de11079cb4d98ed604
tree266b625bfd7d9371a0022c944b3800e7dba5f783
parentec17f0341d6a2c8b8a036999e9fd735a1a6888f4
drm/fb-helper: Fix potential NULL pointer dereference

fb_helper is being dereferenced before it is null checked,
hence there is a potential null pointer dereference.

Fix this by moving the pointer dereference after fb_helper
has been null checked.

This issue was detected with the help of Coccinelle.

Fixes: c777990fb45b ("drm/fb-helper: Handle function NULL argument")
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20171205174628.GA31189@embeddedor.com
drivers/gpu/drm/drm_fb_helper.c