drm/msm: fix crashes on probe failure

Fix issues that occur on the probe failure path. First, remove
an extraneous call to destroy the power handle client. Second,
upstream moved the location of the drm_dev_register call to be
last in the init sequence, as intended by that API. In failure
path we need to make sure to only call drm_dev_unregister if the
driver was previously registered. Moving the drm_drv_register
also requires changing sde_connector to avoid registering the
connector, which tries to create sysfs nodes, before the
drm_drv_regiter has created the overall sysfs root for the
device.

Change-Id: I18caae1d2b2fa2086d5b86676a250b2b06044081
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h
index 647698e..585e206 100644
--- a/drivers/gpu/drm/msm/msm_drv.h
+++ b/drivers/gpu/drm/msm/msm_drv.h
@@ -346,6 +346,9 @@
 
 	/* list of clients waiting for events */
 	struct list_head client_event_list;
+
+	/* whether registered and drm_dev_unregister should be called */
+	bool registered;
 };
 
 struct msm_format {