Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Minghao Chi and committed by
Lyude Paul
ab767128 a425e980

+3 -9
+3 -9
drivers/gpu/drm/nouveau/nouveau_debugfs.c
··· 255 255 int 256 256 nouveau_debugfs_init(struct nouveau_drm *drm) 257 257 { 258 - int ret; 259 - 260 258 drm->debugfs = kzalloc(sizeof(*drm->debugfs), GFP_KERNEL); 261 259 if (!drm->debugfs) 262 260 return -ENOMEM; 263 261 264 - ret = nvif_object_ctor(&drm->client.device.object, "debugfsCtrl", 0, 265 - NVIF_CLASS_CONTROL, NULL, 0, 266 - &drm->debugfs->ctrl); 267 - if (ret) 268 - return ret; 269 - 270 - return 0; 262 + return nvif_object_ctor(&drm->client.device.object, "debugfsCtrl", 0, 263 + NVIF_CLASS_CONTROL, NULL, 0, 264 + &drm->debugfs->ctrl); 271 265 } 272 266 273 267 void