aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/batman-adv
diff options
context:
space:
mode:
authorSven Eckelmann <sven.eckelmann@gmx.de>2010-01-02 11:30:36 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-03 16:42:34 -0800
commitacdfd0e088502dc225f594b5a5598cab53ffd375 (patch)
tree2f31c3448dc957a38e4c642c978e4a8765cabdad /drivers/staging/batman-adv
parent23a51a8061567a47347ade59edf2a0bde0eece30 (diff)
Staging: 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@gmx.de> Acked-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/batman-adv')
-rw-r--r--drivers/staging/batman-adv/hard-interface.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/batman-adv/hard-interface.c b/drivers/staging/batman-adv/hard-interface.c
index e9cb977d001..28d02f68a3f 100644
--- a/drivers/staging/batman-adv/hard-interface.c
+++ b/drivers/staging/batman-adv/hard-interface.c
@@ -399,8 +399,7 @@ int hardif_add_interface(char *dev, int if_num)
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;