projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c2b4e2
)
mtd: sm_ftl: initialize error code
author
Brian Norris
<computersforpeace@gmail.com>
Tue, 22 Jul 2014 02:06:39 +0000
(19:06 -0700)
committer
Brian Norris
<computersforpeace@gmail.com>
Tue, 19 Aug 2014 18:53:07 +0000
(11:53 -0700)
There is one theoretical case that could fall through to using an
uninitialized value as the return code. Let's give it a value of 0.
Untested.
Caught by Coverity.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/sm_ftl.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/sm_ftl.c
b/drivers/mtd/sm_ftl.c
index cf49c22673b903fac33d0b7c2289d26f28a7efe9..c23184a47fc4ea6c1a948ccb4d05f19d84059c4c 100644
(file)
--- a/
drivers/mtd/sm_ftl.c
+++ b/
drivers/mtd/sm_ftl.c
@@
-1058,7
+1058,7
@@
static int sm_write(struct mtd_blktrans_dev *dev,
{
struct sm_ftl *ftl = dev->priv;
struct ftl_zone *zone;
- int error, zone_num, block, boffset;
+ int error
= 0
, zone_num, block, boffset;
BUG_ON(ftl->readonly);
sm_break_offset(ftl, sec_no << 9, &zone_num, &block, &boffset);