drm/nouveau/core/memory: remove redundant assignments to variable ret
Subsystems (4)
PATCH 1/1 drm/nouveau/core/memory: remove redundant assignments to variable ret
From: Colin Ian King <[email protected]>
The variable ret is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by Colin Ian King <[email protected]>
--- drivers/gpu/drm/nouveau/nvkm/core/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nvkm/core/memory.c +1 -1
@@ -140,7 +140,7 @@ nvkm_memory_new(struct nvkm_device *device, enum nvkm_memory_target target, {struct nvkm_instmem *imem = device->imem;struct nvkm_memory *memory; -int ret = -ENOSYS ; +int ret;if (unlikely (target !=NVKM_MEM_TARGET_INST || !imem))return -ENOSYS ;
Signature · 1 line
2.25.0