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>
This commit is contained in:
Sven Eckelmann 2010-01-02 11:30:36 +01:00 committed by Greg Kroah-Hartman
parent 23a51a8061
commit acdfd0e088
1 changed files with 1 additions and 2 deletions

View File

@ -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;