Skip to content

Commit

Permalink
autofs4 - autofs4_catatonic_mode(): remove redundant null check on kf…
Browse files Browse the repository at this point in the history
…ree()

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 <[email protected]>
Signed-off-by: Ian Kent <[email protected]>
Cc: [email protected]
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
rtg-canonical authored and torvalds committed Mar 1, 2013
1 parent 9d8072e commit 5140a8c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions fs/autofs4/waitq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5140a8c

Please sign in to comment.