* [PATCH] staging: remove some pointless conditionals before kfree_skb()
@ 2009-02-25 10:26 Wei Yongjun
2009-02-27 7:08 ` David Miller
2009-03-11 21:10 ` patch staging-remove-some-pointless-conditionals-before-kfree_skb.patch added to gregkh-2.6 tree gregkh
0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2009-02-25 10:26 UTC (permalink / raw)
To: Greg Kroah-Hartman, LKML
Remove some pointless conditionals before kfree_skb().
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
drivers/staging/at76_usb/at76_usb.c | 3 +--
drivers/staging/otus/wwrap.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/at76_usb/at76_usb.c b/drivers/staging/at76_usb/at76_usb.c
index c8e4d31..6f5c1cb 100644
--- a/drivers/staging/at76_usb/at76_usb.c
+++ b/drivers/staging/at76_usb/at76_usb.c
@@ -5370,8 +5370,7 @@ static void at76_delete_device(struct at76_priv *priv)
at76_dbg(DBG_PROC_ENTRY, "%s: unlinked urbs", __func__);
- if (priv->rx_skb)
- kfree_skb(priv->rx_skb);
+ kfree_skb(priv->rx_skb);
at76_free_bss_list(priv);
del_timer_sync(&priv->bss_list_timer);
diff --git a/drivers/staging/otus/wwrap.c b/drivers/staging/otus/wwrap.c
index 1bb5f59..a0b1e0b 100644
--- a/drivers/staging/otus/wwrap.c
+++ b/drivers/staging/otus/wwrap.c
@@ -971,8 +971,7 @@ int zfLnxCencSendMsg(struct sock *netlink_sk, u_int8_t *msg, int len)
out:
return ret;
nlmsg_failure: /*NLMSG_PUT 失败,则撤销套接字缓存*/
- if(skb)
- kfree_skb(skb);
+ kfree_skb(skb);
goto out;
#undef COMMTYPE_GROUP
--
1.5.3.8
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: remove some pointless conditionals before kfree_skb()
2009-02-25 10:26 [PATCH] staging: remove some pointless conditionals before kfree_skb() Wei Yongjun
@ 2009-02-27 7:08 ` David Miller
2009-03-11 21:10 ` patch staging-remove-some-pointless-conditionals-before-kfree_skb.patch added to gregkh-2.6 tree gregkh
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2009-02-27 7:08 UTC (permalink / raw)
To: yjwei; +Cc: gregkh, linux-kernel
From: Wei Yongjun <yjwei@cn.fujitsu.com>
Date: Wed, 25 Feb 2009 18:26:33 +0800
> Remove some pointless conditionals before kfree_skb().
>
> Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
* patch staging-remove-some-pointless-conditionals-before-kfree_skb.patch added to gregkh-2.6 tree
2009-02-25 10:26 [PATCH] staging: remove some pointless conditionals before kfree_skb() Wei Yongjun
2009-02-27 7:08 ` David Miller
@ 2009-03-11 21:10 ` gregkh
1 sibling, 0 replies; 3+ messages in thread
From: gregkh @ 2009-03-11 21:10 UTC (permalink / raw)
To: yjwei, gregkh, linux-kernel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1655 bytes --]
This is a note to let you know that I've just added the patch titled
Subject: Staging: remove some pointless conditionals before kfree_skb()
to my gregkh-2.6 tree. Its filename is
staging-remove-some-pointless-conditionals-before-kfree_skb.patch
This tree can be found at
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/
>From yjwei@cn.fujitsu.com Wed Mar 11 13:27:24 2009
From: Wei Yongjun <yjwei@cn.fujitsu.com>
Date: Wed, 25 Feb 2009 18:26:33 +0800
Subject: Staging: remove some pointless conditionals before kfree_skb()
To: Greg Kroah-Hartman <gregkh@suse.de>, LKML <linux-kernel@vger.kernel.org>
Message-ID: <49A51CD9.4060408@cn.fujitsu.com>
Remove some pointless conditionals before kfree_skb().
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/at76_usb/at76_usb.c | 3 +--
drivers/staging/otus/wwrap.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
--- a/drivers/staging/at76_usb/at76_usb.c
+++ b/drivers/staging/at76_usb/at76_usb.c
@@ -5370,8 +5370,7 @@ static void at76_delete_device(struct at
at76_dbg(DBG_PROC_ENTRY, "%s: unlinked urbs", __func__);
- if (priv->rx_skb)
- kfree_skb(priv->rx_skb);
+ kfree_skb(priv->rx_skb);
at76_free_bss_list(priv);
del_timer_sync(&priv->bss_list_timer);
--- a/drivers/staging/otus/wwrap.c
+++ b/drivers/staging/otus/wwrap.c
@@ -971,8 +971,7 @@ int zfLnxCencSendMsg(struct sock *netlin
out:
return ret;
nlmsg_failure: /*NLMSG_PUT ʧ°Ü£¬Ôò³·ÏúÌ×½Ó×Ö»º´æ*/
- if(skb)
- kfree_skb(skb);
+ kfree_skb(skb);
goto out;
#undef COMMTYPE_GROUP
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-03-11 21:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-25 10:26 [PATCH] staging: remove some pointless conditionals before kfree_skb() Wei Yongjun
2009-02-27 7:08 ` David Miller
2009-03-11 21:10 ` patch staging-remove-some-pointless-conditionals-before-kfree_skb.patch added to gregkh-2.6 tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).