aboutsummaryrefslogtreecommitdiffstats
path: root/fs/autofs4
diff options
context:
space:
mode:
authorTim Gardner <tim.gardner@canonical.com>2013-03-01 06:46:48 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-03-01 15:04:39 -0500
commit5140a8ceaa369d362d0ab7a438a5d99c75ee098d (patch)
tree833fa7772275aaa9aaa12b891852e59cad1c6526 /fs/autofs4
parent9d8072e7c33991a08b29338f3f04dfef7c24afd5 (diff)
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() Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: Ian Kent <raven@themaw.net> Cc: autofs@vger.kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/autofs4')
-rw-r--r--fs/autofs4/waitq.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c
index 03bc1d347d8e..3db70dae40d3 100644
--- a/fs/autofs4/waitq.c
+++ b/fs/autofs4/waitq.c
@@ -42,10 +42,8 @@ void autofs4_catatonic_mode(struct autofs_sb_info *sbi)
42 while (wq) { 42 while (wq) {
43 nwq = wq->next; 43 nwq = wq->next;
44 wq->status = -ENOENT; /* Magic is gone - report failure */ 44 wq->status = -ENOENT; /* Magic is gone - report failure */
45 if (wq->name.name) { 45 kfree(wq->name.name);
46 kfree(wq->name.name); 46 wq->name.name = NULL;
47 wq->name.name = NULL;
48 }
49 wq->wait_ctr--; 47 wq->wait_ctr--;
50 wake_up_interruptible(&wq->queue); 48 wake_up_interruptible(&wq->queue);
51 wq = nwq; 49 wq = nwq;