提交 acdfd0e0 编写于 作者: S Sven Eckelmann 提交者: 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: NSven Eckelmann <sven.eckelmann@gmx.de>
Acked-by: NSimon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 23a51a80
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册