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
This commit is contained in:
parent
a425e9802d
commit
ab7671282b
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue