virtio-gpu: avoid possible NULL pointer dereference
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sun, 21 Aug 2016 21:06:06 +0000 (23:06 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 20 Sep 2016 12:25:39 +0000 (14:25 +0200)
commitb28c69dd3d563676db079a678a2deabf37461fbf
tree5042c64082bd131f1ead5e54d681862c9e994e09
parent4532b241a4b7b0ca372a80baf900ce4ea2015412
virtio-gpu: avoid possible NULL pointer dereference

If output is NULL it is not permissable to dereference it.
So we should leave the respective function in this case.

The inconsistency was indicated by cppcheck.
No actual NULL pointer dereference was observed.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Message-id: 1471813566-5324-1-git-send-email-xypron.glpk@gmx.de
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
drivers/gpu/drm/virtio/virtgpu_plane.c