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

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
Loading
Loading
Loading
Loading
+3 −9
Original line number Diff line number Diff line
@@ -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,
	return nvif_object_ctor(&drm->client.device.object, "debugfsCtrl", 0,
				NVIF_CLASS_CONTROL, NULL, 0,
				&drm->debugfs->ctrl);
	if (ret)
		return ret;

	return 0;
}

void