diff mbox

core: remove pointless conditional before kfree()

Message ID 49D1CFAF.4030109@cn.fujitsu.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Wei Yongjun March 31, 2009, 8:09 a.m. UTC
Remove pointless conditional before kfree().

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
 net/core/ethtool.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

Comments

David Miller March 31, 2009, 10:06 p.m. UTC | #1
From: Wei Yongjun <yjwei@cn.fujitsu.com>
Date: Tue, 31 Mar 2009 16:09:19 +0800

> Remove pointless conditional before kfree().
> 
> Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index 244ca56..d9d5160 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -261,8 +261,7 @@  static int ethtool_get_rxnfc(struct net_device *dev, void __user *useraddr)
 	ret = 0;
 
 err_out:
-	if (rule_buf)
-		kfree(rule_buf);
+	kfree(rule_buf);
 
 	return ret;
 }