summaryrefslogtreecommitdiffstats
path: root/include/drm/drmP.h
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2013-10-02 11:23:37 +0200
committerDave Airlie <airlied@redhat.com>2013-10-09 15:55:09 +1000
commit0dc8fe5985e01f238e7dc64ff1733cc0291811e8 (patch)
tree977b912c062fee10c10e39082546a5ecacd39792 /include/drm/drmP.h
parent1c8887dd01d97781471c9a876e3a4e804bb33f31 (diff)
downloadlinux-0dc8fe5985e01f238e7dc64ff1733cc0291811e8.tar.bz2
drm: introduce drm_dev_free() to fix error paths
The error paths in DRM bus drivers currently leak memory as they don't correctly revert drm_dev_alloc(). Introduce drm_dev_free() to free DRM devices which haven't been registered, yet. We must be careful not to introduce any side-effects with cleanups done in drm_dev_free(). drm_ht_remove(), drm_ctxbitmap_cleanup() and drm_gem_destroy() are all fine in that regard. Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm/drmP.h')
-rw-r--r--include/drm/drmP.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 1973f7966511..537833c9ab83 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1642,6 +1642,7 @@ static __inline__ void drm_core_dropmap(struct drm_local_map *map)
struct drm_device *drm_dev_alloc(struct drm_driver *driver,
struct device *parent);
+void drm_dev_free(struct drm_device *dev);
int drm_dev_register(struct drm_device *dev, unsigned long flags);
int drm_get_minor(struct drm_device *dev, struct drm_minor **minor, int type);
/*@}*/