UPSTREAM: drm/mm: avoid possible null pointer dereference
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Wed, 18 May 2016 20:17:19 +0000 (22:17 +0200)
committerHuang, Tao <huangtao@rock-chips.com>
Tue, 3 Jan 2017 06:11:34 +0000 (14:11 +0800)
commit96cee1532e3927cd8ce106ac37d70a4da60163a7
treeccd997e7745a87129e2846c98c8b17bae740e8d1
parent51239bb2232fdde4921dff0153e7a2dd1dd8dccf
UPSTREAM: drm/mm: avoid possible null pointer dereference

Do not dereference node before the check if node is NULL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1463602639-4861-1-git-send-email-xypron.glpk@gmx.de
(cherry picked from commit b80d3942329dcd43580adc3f7c0a098515b5feec)

Change-Id: I672ce10214e1268a043e6a11268ff400024cc883
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
drivers/gpu/drm/drm_mm.c