*/
int drmm_mode_config_init(struct drm_device *dev)
{
+ int ret;
+
rw_init(&dev->mode_config.mutex, "mcrwl");
drm_modeset_lock_init(&dev->mode_config.connection_mutex);
rw_init(&dev->mode_config.idr_mutex, "idrlk");
init_llist_head(&dev->mode_config.connector_free_list);
INIT_WORK(&dev->mode_config.connector_free_work, drm_connector_free_work_fn);
- drm_mode_create_standard_properties(dev);
+ ret = drm_mode_create_standard_properties(dev);
+ if (ret) {
+ drm_mode_config_cleanup(dev);
+ return ret;
+ }
/* Just to be sure */
dev->mode_config.num_fb = 0;