summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_stub.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2014-05-01 01:31:33 +0200
committerDave Airlie <airlied@redhat.com>2014-05-01 01:31:33 +0200
commit7e9ab4081e646fc317d0a87929a352f0e5082190 (patch)
treeb826ebc9a3aeadde007fe69a8b30754ca7d890bc /drivers/gpu/drm/drm_stub.c
parentdrm: qxl: Remove unused device pointer (diff)
parentdrm: Fix error handling in drm_master_create (diff)
downloadlinux-7e9ab4081e646fc317d0a87929a352f0e5082190.tar.xz
linux-7e9ab4081e646fc317d0a87929a352f0e5082190.zip
Merge branch 'drm-coverity-fixes' of git://people.freedesktop.org/~danvet/drm into drm-next
bunch of coverity fixes all minor. * 'drm-coverity-fixes' of git://people.freedesktop.org/~danvet/drm: drm: Fix error handling in drm_master_create drm/i2c/tda998x: Fix signed overflow issue drm/bochs: Remove unecessary NULL check in gem_free drm/bochs: Remove unnecessary NULL check in bo_unref drm/udl: Initialize ret in udl_driver_load drm/via: Remove unecessary NULL check drm/ast: Remove unecessary NULL check in gem_free drm/ast: Remove unnecessary NULL check in bo_unref drm/cirrus: Remove unecessary NULL check in gem_free drm/cirrus: Remove unnecessary NULL check in bo_unref drm/mgag200: Remove unecessary NULL check in gem_free drm/mgag200: Remove unecessary NULL check in bo_unref
Diffstat (limited to 'drivers/gpu/drm/drm_stub.c')
-rw-r--r--drivers/gpu/drm/drm_stub.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c
index 4c24c3ac1efa..bfa6cb949545 100644
--- a/drivers/gpu/drm/drm_stub.c
+++ b/drivers/gpu/drm/drm_stub.c
@@ -128,7 +128,10 @@ struct drm_master *drm_master_create(struct drm_minor *minor)
kref_init(&master->refcount);
spin_lock_init(&master->lock.spinlock);
init_waitqueue_head(&master->lock.lock_queue);
- drm_ht_create(&master->magiclist, DRM_MAGIC_HASH_ORDER);
+ if (drm_ht_create(&master->magiclist, DRM_MAGIC_HASH_ORDER)) {
+ kfree(master);
+ return NULL;
+ }
INIT_LIST_HEAD(&master->magicfree);
master->minor = minor;