]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/nouveau: simplify the return expression of nouveau_debugfs_init()
authorMinghao Chi <chi.minghao@zte.com.cn>
Fri, 29 Apr 2022 09:03:09 +0000 (09:03 +0000)
committerLyude Paul <lyude@redhat.com>
Fri, 29 Apr 2022 19:44:54 +0000 (15:44 -0400)
Simplify the return expression.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Reviewed-by: Lyude Paul <lyude@redhat.com>
[fixed an indenting error before pushing]
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220429090309.3853003-1-chi.minghao@zte.com.cn
drivers/gpu/drm/nouveau/nouveau_debugfs.c

index 1cbe01048b9304fe838252fbd70c2217b60dda8d..2a36d1ca8fdab533c35cbbcb8b4e7842a02e2c58 100644 (file)
@@ -255,19 +255,13 @@ nouveau_drm_debugfs_init(struct drm_minor *minor)
 int
 nouveau_debugfs_init(struct nouveau_drm *drm)
 {
-       int ret;
-
        drm->debugfs = kzalloc(sizeof(*drm->debugfs), GFP_KERNEL);
        if (!drm->debugfs)
                return -ENOMEM;
 
-       ret = nvif_object_ctor(&drm->client.device.object, "debugfsCtrl", 0,
-                              NVIF_CLASS_CONTROL, NULL, 0,
-                              &drm->debugfs->ctrl);
-       if (ret)
-               return ret;
-
-       return 0;
+       return nvif_object_ctor(&drm->client.device.object, "debugfsCtrl", 0,
+                               NVIF_CLASS_CONTROL, NULL, 0,
+                               &drm->debugfs->ctrl);
 }
 
 void