mtd: afs: remove unneeded NULL check

NULL check before kfree is unneeded, so remove it.

Signed-off-by: Ding Xiang <dingxiang@cmss.chinamobile.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
Ding Xiang 2019-05-29 15:18:22 +08:00 committed by Richard Weinberger
parent 1d2af80d58
commit 63898ab515
1 changed files with 1 additions and 2 deletions

View File

@ -371,8 +371,7 @@ static int parse_afs_partitions(struct mtd_info *mtd,
out_free_parts:
while (i >= 0) {
if (parts[i].name)
kfree(parts[i].name);
kfree(parts[i].name);
i--;
}
kfree(parts);