From: Joseph-Eugene Winzer <m999@openmailbox.org>
To: m999@openmailbox.org, gregkh@linuxfoundation.org
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/5] drivers: staging: rtl8192u: removed pointer check for kfree in r8192U_core.c
Date: Fri, 17 Jul 2015 15:59:18 +0200 [thread overview]
Message-ID: <1437141560-22517-3-git-send-email-m999@openmailbox.org> (raw)
In-Reply-To: <1437141560-22517-1-git-send-email-m999@openmailbox.org>
kfree() can handle NULL pointers itself, so the check is unnecessary.
Signed-off-by: Joseph-Eugene Winzer <m999@openmailbox.org>
---
drivers/staging/rtl8192u/r8192U_core.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 89b627f..34dc4af 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -1803,10 +1803,8 @@ static void rtl8192_usb_deleteendpoints(struct net_device *dev)
}
kfree(priv->oldaddr);
priv->oldaddr = NULL;
- if (priv->pp_rxskb) {
- kfree(priv->pp_rxskb);
- priv->pp_rxskb = NULL;
- }
+ kfree(priv->pp_rxskb);
+ priv->pp_rxskb = NULL;
}
#else
void rtl8192_usb_deleteendpoints(struct net_device *dev)
@@ -1831,11 +1829,8 @@ void rtl8192_usb_deleteendpoints(struct net_device *dev)
priv->rx_urb = NULL;
kfree(priv->oldaddr);
priv->oldaddr = NULL;
- if (priv->pp_rxskb) {
- kfree(priv->pp_rxskb);
- priv->pp_rxskb = 0;
-
- }
+ kfree(priv->pp_rxskb);
+ priv->pp_rxskb = 0;
#endif
}
--
2.4.6
next prev parent reply other threads:[~2015-07-17 14:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-17 13:59 [PATCH 1/5] drivers: staging: rtl8192u: fixing coding style issues " Joseph-Eugene Winzer
2015-07-17 13:59 ` [PATCH 2/5] " Joseph-Eugene Winzer
2015-07-18 0:11 ` Joe Perches
2015-07-18 12:29 ` m999
2015-07-19 10:48 ` Dan Carpenter
2015-07-17 13:59 ` Joseph-Eugene Winzer [this message]
2015-07-17 13:59 ` [PATCH 4/5] drivers: staging: rtl8192u: included linux/uaccess.h instead of asm/uaccess.h Joseph-Eugene Winzer
2015-07-17 13:59 ` [PATCH 5/5] drivers: staging: rtl8192u: fixed coding style issues in r8192U_core.c Joseph-Eugene Winzer
2015-07-18 0:15 ` Joe Perches
2015-07-23 4:02 ` [PATCH 1/5] drivers: staging: rtl8192u: fixing " Greg KH
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=1437141560-22517-3-git-send-email-m999@openmailbox.org \
--to=m999@openmailbox.org \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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
all inboxes | Powered by JetHome®