Author: simon
Date: 2009-12-13 18:21:03 +0000 (Sun, 13 Dec 2009)
New Revision: 1493
Modified:
trunk/batman-adv-kernelland/hard-interface.c
Log:
batman-adv: Remove NULL pointer check
It is safe to call kfree(NULL) which makes this extra check unneeded. It
was found using checkpatch.pl from linux-2.6
Signed-off-by: Sven Eckelmann <sven.eckelmann(a)gmx.de>
Acked-by: Simon Wunderlich <siwu(a)hrz.tu-chemnitz.de>
Modified: trunk/batman-adv-kernelland/hard-interface.c
===================================================================
--- trunk/batman-adv-kernelland/hard-interface.c 2009-12-13 18:16:07 UTC (rev 1492)
+++ trunk/batman-adv-kernelland/hard-interface.c 2009-12-13 18:21:03 UTC (rev 1493)
@@ -399,8 +399,7 @@
return 1;
out:
- if (batman_if->packet_buff)
- kfree(batman_if->packet_buff);
+ kfree(batman_if->packet_buff);
kfree(batman_if);
kfree(dev);
return -1;