Commit acdfd0e0 authored by Sven Eckelmann's avatar Sven Eckelmann Committed by Greg Kroah-Hartman

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: default avatarSven Eckelmann <sven.eckelmann@gmx.de>
Acked-by: default avatarSimon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 23a51a80
...@@ -399,7 +399,6 @@ int hardif_add_interface(char *dev, int if_num) ...@@ -399,7 +399,6 @@ int hardif_add_interface(char *dev, int if_num)
return 1; return 1;
out: out:
if (batman_if->packet_buff)
kfree(batman_if->packet_buff); kfree(batman_if->packet_buff);
kfree(batman_if); kfree(batman_if);
kfree(dev); kfree(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment