diff options
author | Sven Eckelmann <sven.eckelmann@gmx.de> | 2010-01-02 10:30:36 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-04 00:42:34 (GMT) |
commit | acdfd0e088502dc225f594b5a5598cab53ffd375 (patch) | |
tree | 2f31c3448dc957a38e4c642c978e4a8765cabdad /drivers/staging/batman-adv | |
parent | 23a51a8061567a47347ade59edf2a0bde0eece30 (diff) | |
download | linux-fsl-qoriq-acdfd0e088502dc225f594b5a5598cab53ffd375.tar.xz |
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.c | 3 |
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 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; |