drm: qxl: Fix error handling at qxl_device_init
authorAnton Vasilyev <vasilyev@ispras.ru>
Fri, 27 Jul 2018 11:54:40 +0000 (14:54 +0300)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 10 Aug 2018 05:57:48 +0000 (07:57 +0200)
commit5043348a4969ae1661c008efe929abd0d76e3792
treeef21572b2d7419b5efc9c3d20db52667a038d990
parentb0d146ac7b9a9f1e1303aca9e1e828348f5d8a2f
drm: qxl: Fix error handling at qxl_device_init

If qxl_device_init fails on creating resources and does not report it,
then qxl module will catch null pointer exception on remove, or on
probe's error path.

The patch adds error path with resources release into qxl_device_init.

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

Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru>
Link: http://patchwork.freedesktop.org/patch/msgid/20180727115440.11112-1-vasilyev@ispras.ru
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
drivers/gpu/drm/qxl/qxl_kms.c