The following commit has been merged in the linux branch: commit 786bfd5f6633cc0baed13a17528916f04563eada Author: simon simon@45894c77-fb22-0410-b583-ff6e7d5dbf6c Date: Sun Dec 13 18:21:03 2009 +0000
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
diff --git a/drivers/staging/batman-adv/hard-interface.c b/drivers/staging/batman-adv/hard-interface.c index e9cb977..28d02f6 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;