]> git.baikalelectronics.ru Git - kernel.git/commit
drm/msm: don't deref error pointer in the msm_fbdev_create error path
authorEmil Velikov <emil.velikov@collabora.com>
Wed, 28 Mar 2018 16:22:16 +0000 (17:22 +0100)
committerRob Clark <robdclark@gmail.com>
Thu, 19 Apr 2018 14:09:41 +0000 (10:09 -0400)
commit4849dc2cf33db6898131d0d7ba58a85d208083e6
tree954c849f82d4fffd55c1f20256cf22650bd76502
parentc4eae603ba68924e51f6f9f47428031650431871
drm/msm: don't deref error pointer in the msm_fbdev_create error path

Currently the error pointer returned by msm_alloc_stolen_fb gets passed
to drm_framebuffer_remove. The latter handles only NULL pointers, thus
a nasty crash will occur.

Drop the unnecessary fail label and the associated checks - both err and
fb will be set at this stage.

Cc: Rob Clark <robdclark@gmail.com>
Cc: linux-arm-msm@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: freedreno@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/msm_fbdev.c