autofs4 - autofs4_catatonic_mode(): remove redundant null check on kfree()
authorTim Gardner <tim.gardner@canonical.com>
Fri, 1 Mar 2013 11:46:48 +0000 (19:46 +0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 1 Mar 2013 20:04:39 +0000 (12:04 -0800)
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>
fs/autofs4/waitq.c

index 03bc1d347d8e58f41ae2d1facda91e3deee470ee..3db70dae40d3a842de562c9fb4e26c29f9284239 100644 (file)
@@ -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;
This page took 0.026785 seconds and 5 git commands to generate.