Skip to contentSkip to conversation

Ignored return value in drivers/mtd/chips/sharp.c

PATCH New Eric Sesterhenn 1 participant 1 message Jun 21, 2006 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Ignored return value in drivers/mtd/chips/sharp.c

hi,

coverity (id #10) spotted that we never reach the return ret; statement, since ret never gets assigned a value except the 0 at initialisation. I assume it was meant to hold the result
of sharp_write_oneword().

drivers/mtd/chips/sharp.c renamed from drivers/mtd/chips/sharp.c.orig +2 -1
@@ -342,7 +342,8 @@ static int sharp_write(struct mtd_info *
 			len--;
 			j++;
 		}
-		sharp_write_oneword(map, &sharp->chips[chipnum], ofs&~3, tbuf.l);
+		ret = sharp_write_oneword(map, &sharp->chips[chipnum],
+						ofs&~3, tbuf.l);
 		if(ret<0)
 			return ret;
 		(*retlen)+=j;