From: Wei Yongjun <yjwei@cn•fujitsu.com>
To: Samuel Ortiz <samuel@sortiz•org>, Jeff Garzik <jgarzik@pobox•com>
Cc: netdev@vger•kernel.org
Subject: [PATCH] irda: remove some pointless conditionals before kfree_skb()
Date: Wed, 25 Feb 2009 18:14:27 +0800 [thread overview]
Message-ID: <49A51A03.1010201@cn.fujitsu.com> (raw)
Remove some pointless conditionals before kfree_skb().
Signed-off-by: Wei Yongjun <yjwei@cn•fujitsu.com>
---
drivers/net/irda/sir_dev.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/net/irda/sir_dev.c b/drivers/net/irda/sir_dev.c
index c23d211..803c0be 100644
--- a/drivers/net/irda/sir_dev.c
+++ b/drivers/net/irda/sir_dev.c
@@ -780,8 +780,7 @@ static int sirdev_alloc_buffers(struct sir_dev *dev)
static void sirdev_free_buffers(struct sir_dev *dev)
{
- if (dev->rx_buff.skb)
- kfree_skb(dev->rx_buff.skb);
+ kfree_skb(dev->rx_buff.skb);
kfree(dev->tx_buff.head);
dev->rx_buff.head = dev->tx_buff.head = NULL;
dev->rx_buff.skb = NULL;
--
1.5.3.8
next reply other threads:[~2009-02-25 10:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-25 10:14 Wei Yongjun [this message]
2009-02-27 7:07 ` [PATCH] irda: remove some pointless conditionals before kfree_skb() David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49A51A03.1010201@cn.fujitsu.com \
--to=yjwei@cn$(echo .)fujitsu.com \
--cc=jgarzik@pobox$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=samuel@sortiz$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox