Message ID | 20201119071308.9292-5-manivannan.sadhasivam@linaro.org |
---|---|
State | Accepted |
Commit | 7b844cf445f0a7daa68be0ce71eb2c88d68b0c5d |
Headers | show |
Series | Add support for Qcom SMEM based NAND parser | expand |
diff --git a/drivers/mtd/parsers/afs.c b/drivers/mtd/parsers/afs.c index 980e332bdac4..26116694c821 100644 --- a/drivers/mtd/parsers/afs.c +++ b/drivers/mtd/parsers/afs.c @@ -370,10 +370,8 @@ static int parse_afs_partitions(struct mtd_info *mtd, return i; out_free_parts: - while (i >= 0) { + while (--i >= 0) kfree(parts[i].name); - i--; - } kfree(parts); *pparts = NULL; return ret;