diff options
author | Minghao Chi <chi.minghao@zte.com.cn> | 2022-04-29 12:03:09 +0300 |
---|---|---|
committer | Lyude Paul <lyude@redhat.com> | 2022-04-29 22:44:54 +0300 |
commit | ab7671282b7ca750b5de99b2a59e51edab34ecc7 (patch) | |
tree | 80858c8792cb77c6265b4a1c59d05677906fe9e2 /drivers/gpu/drm/nouveau/nouveau_debugfs.c | |
parent | a425e9802d029838660edd898667f8da6c64b030 (diff) | |
download | linux-ab7671282b7ca750b5de99b2a59e51edab34ecc7.tar.xz |
drm/nouveau: simplify the return expression of nouveau_debugfs_init()
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
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_debugfs.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_debugfs.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.c b/drivers/gpu/drm/nouveau/nouveau_debugfs.c index 1cbe01048b93..2a36d1ca8fda 100644 --- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c +++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c @@ -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 |