From 63898ab5159f6349f58b23cbf9cd06a824d88527 Mon Sep 17 00:00:00 2001 From: Ding Xiang Date: Wed, 29 May 2019 15:18:22 +0800 Subject: [PATCH] mtd: afs: remove unneeded NULL check NULL check before kfree is unneeded, so remove it. Signed-off-by: Ding Xiang Signed-off-by: Richard Weinberger --- drivers/mtd/parsers/afs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mtd/parsers/afs.c b/drivers/mtd/parsers/afs.c index f24d768eee30..752b6cf005f7 100644 --- a/drivers/mtd/parsers/afs.c +++ b/drivers/mtd/parsers/afs.c @@ -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);