提交 5140a8ce 编写于 作者: T Tim Gardner 提交者: Linus Torvalds

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: NTim Gardner <tim.gardner@canonical.com>
Signed-off-by: NIan Kent <raven@themaw.net>
Cc: autofs@vger.kernel.org
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 9d8072e7
...@@ -42,10 +42,8 @@ void autofs4_catatonic_mode(struct autofs_sb_info *sbi) ...@@ -42,10 +42,8 @@ void autofs4_catatonic_mode(struct autofs_sb_info *sbi)
while (wq) { while (wq) {
nwq = wq->next; nwq = wq->next;
wq->status = -ENOENT; /* Magic is gone - report failure */ wq->status = -ENOENT; /* Magic is gone - report failure */
if (wq->name.name) { kfree(wq->name.name);
kfree(wq->name.name); wq->name.name = NULL;
wq->name.name = NULL;
}
wq->wait_ctr--; wq->wait_ctr--;
wake_up_interruptible(&wq->queue); wake_up_interruptible(&wq->queue);
wq = nwq; wq = nwq;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册