diff options
author | Tim Gardner <tim.gardner@canonical.com> | 2013-03-01 12:46:48 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-03-01 21:04:39 +0100 |
commit | 5140a8ceaa369d362d0ab7a438a5d99c75ee098d (patch) | |
tree | 833fa7772275aaa9aaa12b891852e59cad1c6526 | |
parent | autofs - Fix sparse warning: context imbalance in autofs4_d_automount() diffe... (diff) | |
download | linux-5140a8ceaa369d362d0ab7a438a5d99c75ee098d.tar.xz linux-5140a8ceaa369d362d0ab7a438a5d99c75ee098d.zip |
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>
-rw-r--r-- | fs/autofs4/waitq.c | 6 |
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) 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; |