Commit ab767128 authored by Minghao Chi's avatar Minghao Chi Committed by Lyude Paul

drm/nouveau: simplify the return expression of nouveau_debugfs_init()

Simplify the return expression.
Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarMinghao Chi <chi.minghao@zte.com.cn>
Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
[fixed an indenting error before pushing]
Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220429090309.3853003-1-chi.minghao@zte.com.cn
parent a425e980
...@@ -255,19 +255,13 @@ nouveau_drm_debugfs_init(struct drm_minor *minor) ...@@ -255,19 +255,13 @@ nouveau_drm_debugfs_init(struct drm_minor *minor)
int int
nouveau_debugfs_init(struct nouveau_drm *drm) nouveau_debugfs_init(struct nouveau_drm *drm)
{ {
int ret;
drm->debugfs = kzalloc(sizeof(*drm->debugfs), GFP_KERNEL); drm->debugfs = kzalloc(sizeof(*drm->debugfs), GFP_KERNEL);
if (!drm->debugfs) if (!drm->debugfs)
return -ENOMEM; return -ENOMEM;
ret = nvif_object_ctor(&drm->client.device.object, "debugfsCtrl", 0, return nvif_object_ctor(&drm->client.device.object, "debugfsCtrl", 0,
NVIF_CLASS_CONTROL, NULL, 0, NVIF_CLASS_CONTROL, NULL, 0,
&drm->debugfs->ctrl); &drm->debugfs->ctrl);
if (ret)
return ret;
return 0;
} }
void void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment