NULL check before kfree is unneeded, so remove it.
Signed-off-by: Ding Xiang <[email protected]>
---
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 0c73002..972b260 100644
--- a/drivers/mtd/parsers/afs.c
+++ b/drivers/mtd/parsers/afs.c
@@ -383,8 +383,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);
--
1.9.1
On Wed, May 29, 2019 at 9:19 AM Ding Xiang
<[email protected]> wrote:
>
> NULL check before kfree is unneeded, so remove it.
>
> Signed-off-by: Ding Xiang <[email protected]>
Applied.
--
Thanks,
//richard