drm/msm : Unreference after using drm find object
DRM find object is ref-counted, unreference is needed
after usage for proper clean up. This change will fix
the sequence where unreference is not called.
Change-Id: I9fc638ed573b44d0d733ab1709a920a18121944a
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index 33778f8e..00cf225 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -1193,6 +1193,8 @@
break;
}
+ drm_mode_object_unreference(arg_obj);
+
return ret;
}
@@ -1209,6 +1211,9 @@
return -ENOENT;
ret = kms->funcs->register_events(kms, arg_obj, req->event, en);
+
+ drm_mode_object_unreference(arg_obj);
+
return ret;
}