Skip to content

Commit

Permalink
drm: coding-style fixes in minor handling
Browse files Browse the repository at this point in the history
Properly name goto-labels, remove empty lines and use DRM_ERROR if
possible.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
  • Loading branch information
David Herrmann committed Mar 16, 2014
1 parent 5817878 commit 1abbc43
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions drivers/gpu/drm/drm_stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
if (ret) {
DRM_ERROR("DRM: Failed to initialize /sys/kernel/debug/dri.\n");
goto err_mem;
goto err_id;
}

ret = drm_sysfs_device_add(new_minor);
if (ret) {
printk(KERN_ERR
"DRM: Error sysfs_device_add.\n");
DRM_ERROR("DRM: Error sysfs_device_add.\n");
goto err_debugfs;
}

DRM_DEBUG("new minor assigned %d\n", minor_id);
return 0;


err_debugfs:
drm_debugfs_cleanup(new_minor);
err_mem:
err_id:
idr_remove(&drm_minors_idr, minor_id);
return ret;
}
Expand Down

0 comments on commit 1abbc43

Please sign in to comment.