提交 1abbc437 编写于 作者: D David Herrmann

drm: coding-style fixes in minor handling

Properly name goto-labels, remove empty lines and use DRM_ERROR if
possible.
Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
上级 5817878c
...@@ -325,23 +325,21 @@ static int drm_minor_register(struct drm_device *dev, unsigned int type) ...@@ -325,23 +325,21 @@ static int drm_minor_register(struct drm_device *dev, unsigned int type)
ret = drm_debugfs_init(new_minor, minor_id, drm_debugfs_root); ret = drm_debugfs_init(new_minor, minor_id, drm_debugfs_root);
if (ret) { if (ret) {
DRM_ERROR("DRM: Failed to initialize /sys/kernel/debug/dri.\n"); DRM_ERROR("DRM: Failed to initialize /sys/kernel/debug/dri.\n");
goto err_mem; goto err_id;
} }
ret = drm_sysfs_device_add(new_minor); ret = drm_sysfs_device_add(new_minor);
if (ret) { if (ret) {
printk(KERN_ERR DRM_ERROR("DRM: Error sysfs_device_add.\n");
"DRM: Error sysfs_device_add.\n");
goto err_debugfs; goto err_debugfs;
} }
DRM_DEBUG("new minor assigned %d\n", minor_id); DRM_DEBUG("new minor assigned %d\n", minor_id);
return 0; return 0;
err_debugfs: err_debugfs:
drm_debugfs_cleanup(new_minor); drm_debugfs_cleanup(new_minor);
err_mem: err_id:
idr_remove(&drm_minors_idr, minor_id); idr_remove(&drm_minors_idr, minor_id);
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册