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

drm/nouveau/devinit/nva3-: fix returnvar.cocci warning

Fix the following coccicheck warning:
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c:71:5-12:
Unneeded variable: "disable". Return "0ULL" on line 85.

Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220425114701.7182-1-guozhengkui@vivo.com

authored by

Guo Zhengkui and committed by
Lyude Paul
febd8fde 7f7166d0

+1 -2
+1 -2
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c
··· 68 68 struct nvkm_device *device = init->subdev.device; 69 69 u32 r001540 = nvkm_rd32(device, 0x001540); 70 70 u32 r00154c = nvkm_rd32(device, 0x00154c); 71 - u64 disable = 0ULL; 72 71 73 72 if (!(r001540 & 0x40000000)) { 74 73 nvkm_subdev_disable(device, NVKM_ENGINE_MSPDEC, 0); ··· 81 82 if (!(r00154c & 0x00000200)) 82 83 nvkm_subdev_disable(device, NVKM_ENGINE_CE, 0); 83 84 84 - return disable; 85 + return 0ULL; 85 86 } 86 87 87 88 static u32