[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1360689138-59191-1-git-send-email-tim.gardner@canonical.com>
Date: Tue, 12 Feb 2013 10:12:18 -0700
From: Tim Gardner <tim.gardner@...onical.com>
To: linux-kernel@...r.kernel.org
Cc: Tim Gardner <tim.gardner@...onical.com>,
Ian Kent <raven@...maw.net>, autofs@...r.kernel.org
Subject: [PATCH linux-next] autofs4: autofs4_catatonic_mode(): remove redundant null check on kfree()
smatch analysis:
fs/autofs4/waitq.c:46 autofs4_catatonic_mode() info: redundant null
check on wq->name.name calling kfree()
Cc: Ian Kent <raven@...maw.net>
Cc: autofs@...r.kernel.org
Signed-off-by: Tim Gardner <tim.gardner@...onical.com>
---
fs/autofs4/waitq.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c
index 03bc1d3..3db70da 100644
--- a/fs/autofs4/waitq.c
+++ b/fs/autofs4/waitq.c
@@ -42,10 +42,8 @@ void autofs4_catatonic_mode(struct autofs_sb_info *sbi)
while (wq) {
nwq = wq->next;
wq->status = -ENOENT; /* Magic is gone - report failure */
- if (wq->name.name) {
- kfree(wq->name.name);
- wq->name.name = NULL;
- }
+ kfree(wq->name.name);
+ wq->name.name = NULL;
wq->wait_ctr--;
wake_up_interruptible(&wq->queue);
wq = nwq;
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists