projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a425e98
)
drm/nouveau: simplify the return expression of nouveau_debugfs_init()
author
Minghao Chi
<chi.minghao@zte.com.cn>
Fri, 29 Apr 2022 09:03:09 +0000
(09:03 +0000)
committer
Lyude 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
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/nouveau/nouveau_debugfs.c
b/drivers/gpu/drm/nouveau/nouveau_debugfs.c
index 1cbe01048b9304fe838252fbd70c2217b60dda8d..2a36d1ca8fdab533c35cbbcb8b4e7842a02e2c58 100644
(file)
--- 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