Skip to contentSkip to conversation

drm/nouveau/fb: remove unneeded an condition

PATCH New Dan Carpenter 1 participant 1 message Mar 23, 2015

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/nouveau/fb: remove unneeded an condition

We checked "ver" and "ramcfg.size" before and they haven't changed so static checkers complain when we test them again here. "rammap.data" isn't be NULL so "ramcfg.data" is also not NULL so there is no need to check.

drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c +0 -4
index de9f395..e465635 100644
@@ -157,10 +157,6 @@ gf100_ram_calc(struct nvkm_fb *pfb, u32 freq)
 	}
 
 	ramcfg.data = rammap.data + rammap.size + (strap * ramcfg.size);
-	if (!ramcfg.data || ver != 0x10 || ramcfg.size < 0x0e) {
-		nv_error(pfb, "invalid/missing ramcfg entry\n");
-		return -EINVAL;
-	}
 
 	/* lookup memory timings, if bios says they're present */
 	strap = nv_ro08(bios, ramcfg.data + 0x01);