[PATCH] redundant NULL check before kfree cleanup for fs/afs/

From: Jesper Juhl
Date: Fri Mar 25 2005 - 15:22:13 EST



kfree() handles NULL pointers just fine, checking first is not needed.


Signed-off-by: Jesper Juhl <juhl-lkml@xxxxxx>

diff -upr linux-2.6.12-rc1-mm3-orig/fs/afs/file.c linux-2.6.12-rc1-mm3/fs/afs/file.c
--- linux-2.6.12-rc1-mm3-orig/fs/afs/file.c 2005-03-25 15:28:58.000000000 +0100
+++ linux-2.6.12-rc1-mm3/fs/afs/file.c 2005-03-25 20:55:17.000000000 +0100
@@ -308,8 +308,7 @@ static int afs_file_releasepage(struct p
page->private = 0;
ClearPagePrivate(page);

- if (pageio)
- kfree(pageio);
+ kfree(pageio);
}

_leave(" = 0");


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/