lkml.org 
[lkml]   [2006]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[Patch] Ignored return value in drivers/mtd/chips/sharp.c
From
Date
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().

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>

--- linux-2.6/drivers/mtd/chips/sharp.c.orig 2006-06-21 22:03:45.000000000 +0200
+++ linux-2.6/drivers/mtd/chips/sharp.c 2006-06-21 22:04:48.000000000 +0200
@@ -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;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-21 22:09    [W:0.083 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site