From: Markus Elfring <elfr...@users.sourceforge.net>
Date: Sun, 11 Mar 2018 14:00:09 +0100

The kfree() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

Signed-off-by: Markus Elfring <elfr...@users.sourceforge.net>
---
 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 9cc4651990e3..e831bd85cad4 100644
--- a/arch/um/drivers/vector_user.c
+++ b/arch/um/drivers/vector_user.c
@@ -422,8 +422,7 @@ static struct vector_fds *user_init_socket_fds(struct 
arglist *ifspec, int id)
        if (fd >= 0)
                os_close_file(fd);
        if (result != NULL) {
-               if (result->remote_addr != NULL)
-                       kfree(result->remote_addr);
+               kfree(result->remote_addr);
                kfree(result);
        }
 
-- 
2.16.2

Reply via email to