OSDN Git Service

drm/nouveau: Remove unused variable ret
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Fri, 19 Mar 2021 08:40:40 +0000 (16:40 +0800)
committerKarol Herbst <kherbst@redhat.com>
Fri, 12 Nov 2021 22:46:04 +0000 (23:46 +0100)
Fix the following coccicheck warnings:

./drivers/gpu/drm/nouveau/nouveau_bios.c:2048:5-8: Unneeded variable:
"ret". Return "0" on line 2061.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Link: https://gitlab.freedesktop.org/drm/nouveau/-/merge_requests/10
drivers/gpu/drm/nouveau/nouveau_bios.c

index e8c445e..41b78e9 100644 (file)
@@ -2045,7 +2045,6 @@ nouveau_run_vbios_init(struct drm_device *dev)
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
        struct nvbios *bios = &drm->vbios;
-       int ret = 0;
 
        /* Reset the BIOS head to 0. */
        bios->state.crtchead = 0;
@@ -2058,7 +2057,7 @@ nouveau_run_vbios_init(struct drm_device *dev)
                bios->fp.lvds_init_run = false;
        }
 
-       return ret;
+       return 0;
 }
 
 static bool