The "tmp_retlen" variable can be uninitialized if action() fails. It's
harmless except for the static checker warning. I have moved the error
handling earlier to fix it.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
size_t tmp_retlen;
ret = action(mtd, from, len, &tmp_retlen, buf);
size_t tmp_retlen;
ret = action(mtd, from, len, &tmp_retlen, buf);
buf += tmp_retlen;
len -= tmp_retlen;
*retlen += tmp_retlen;
buf += tmp_retlen;
len -= tmp_retlen;
*retlen += tmp_retlen;