ret maybe used uninitialised in some cases so instead
initialise it first to prevent this.
This issue was found by Smatch.
Fixes:
9671243e8d10 (cmd: mtd: Use the subcmd infrastructure to declare mtd sub-commands)
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
struct mtd_info *mtd;
u32 oob_len;
u8 *buf;
- int ret;
+ int ret = CMD_RET_SUCCESS;
if (argc < 2)
return CMD_RET_USAGE;