diff mbox

[5/8] drm:drm_gem Fix warning: variable 'dev' set but not used

Message ID 1276547208-26569-6-git-send-email-justinmattock@gmail.com (mailing list archive)
State Not Applicable
Delegated to: Douglas Landgraf
Headers show

Commit Message

Justin P. Mattock June 14, 2010, 8:26 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index 33dad3f..e8180c9 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -206,6 +206,8 @@  drm_gem_handle_delete(struct drm_file *filp, u32 handle)
 		return -EINVAL;
 	}
 	dev = obj->dev;
+	if (!dev)
+		dev = 0;
 
 	/* Release reference and decrement refcount. */
 	idr_remove(&filp->object_idr, handle);