[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1596076185-39276-1-git-send-email-liheng40@huawei.com>
Date: Thu, 30 Jul 2020 10:29:45 +0800
From: Li Heng <liheng40@...wei.com>
To: <jdike@...toit.com>, <richard@....at>,
<anton.ivanov@...bridgegreys.com>
CC: <linux-um@...ts.infradead.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH -next] um: Remove redundant NULL check
Fix below warnings reported by coccicheck:
./arch/um/drivers/vector_user.c:403:2-7: WARNING: NULL check before some freeing functions is not needed.
Signed-off-by: Li Heng <liheng40@...wei.com>
---
arch/um/drivers/vector_user.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/um/drivers/vector_user.c b/arch/um/drivers/vector_user.c
index c4a0f26..e836d49 100644
--- a/arch/um/drivers/vector_user.c
+++ b/arch/um/drivers/vector_user.c
@@ -399,8 +399,7 @@ static struct vector_fds *user_init_fd_fds(struct arglist *ifspec)
fd_cleanup:
if (fd >= 0)
os_close_file(fd);
- if (result != NULL)
- kfree(result);
+ kfree(result);
return NULL;
}
--
2.7.4
Powered by blists - more mailing lists