lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1383400074-30555-10-git-send-email-govindarajulu90@gmail.com>
Date:	Sat,  2 Nov 2013 19:17:50 +0530
From:	Govindarajulu Varadarajan <govindarajulu90@...il.com>
To:	davem@...emloft.net, gregkh@...uxfoundation.org,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	schwidefsky@...ibm.com, linville@...driver.com,
	linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
	IvDoorn@...il.com, sbhatewara@...are.com, samuel@...tiz.org,
	chas@....nrl.navy.mil, roland@...nel.org, isdn@...ux-pingi.de,
	jcliburn@...il.com, benve@...co.com, ssujith@...co.com,
	jeffrey.t.kirsher@...el.com, jesse.brandeburg@...el.com,
	shahed.shaikh@...gic.com, joe@...ches.com, apw@...onical.com
Cc:	Govindarajulu Varadarajan <govindarajulu90@...il.com>
Subject: [PATCH net-next 09/13] driver: s390: remove unnecessary NULL check before dev_kfree_skb_any

dev_kfree_skb_any is protected from NULL. No need to check for NULL
while calling this function.

Signed-off-by: Govindarajulu Varadarajan <govindarajulu90@...il.com>
---
 drivers/s390/net/claw.c           | 6 ++----
 drivers/s390/net/ctcm_mpc.c       | 6 ++----
 drivers/s390/net/qeth_core_main.c | 6 ++----
 3 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c
index fd7b3bd..66c0b14 100644
--- a/drivers/s390/net/claw.c
+++ b/drivers/s390/net/claw.c
@@ -834,10 +834,8 @@ claw_release(struct net_device *dev)
                         ccw_check_return_code(privptr->channel[i].cdev, rc);
                 }
         }
-	if (privptr->pk_skb != NULL) {
-		dev_kfree_skb_any(privptr->pk_skb);
-		privptr->pk_skb = NULL;
-	}
+	dev_kfree_skb_any(privptr->pk_skb);
+	privptr->pk_skb = NULL;
 	if(privptr->buffs_alloc != 1) {
 		CLAW_DBF_TEXT(4, trace, "none2fre");
 		return 0;
diff --git a/drivers/s390/net/ctcm_mpc.c b/drivers/s390/net/ctcm_mpc.c
index 2dbc77b..2dd53a6 100644
--- a/drivers/s390/net/ctcm_mpc.c
+++ b/drivers/s390/net/ctcm_mpc.c
@@ -964,8 +964,7 @@ void mpc_channel_action(struct channel *ch, int direction, int action)
 		grp->outstanding_xid2++;
 		ch->in_mpcgroup = 1;
 
-		if (ch->xid_skb != NULL)
-			dev_kfree_skb_any(ch->xid_skb);
+		dev_kfree_skb_any(ch->xid_skb);
 
 		ch->xid_skb = __dev_alloc_skb(MPC_BUFSIZE_DEFAULT,
 					GFP_ATOMIC | GFP_DMA);
@@ -1017,8 +1016,7 @@ void mpc_channel_action(struct channel *ch, int direction, int action)
 		grp->num_channel_paths--;
 		grp->active_channels[direction]--;
 
-		if (ch->xid_skb != NULL)
-			dev_kfree_skb_any(ch->xid_skb);
+		dev_kfree_skb_any(ch->xid_skb);
 		ch->xid_skb = NULL;
 
 		if (grp->channels_terminating)
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index 0a328d0..7d33b94 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -1282,10 +1282,8 @@ static void qeth_free_qdio_buffers(struct qeth_card *card)
 
 	qeth_free_cq(card);
 	cancel_delayed_work_sync(&card->buffer_reclaim_work);
-	for (j = 0; j < QDIO_MAX_BUFFERS_PER_Q; ++j) {
-		if (card->qdio.in_q->bufs[j].rx_skb)
-			dev_kfree_skb_any(card->qdio.in_q->bufs[j].rx_skb);
-	}
+	for (j = 0; j < QDIO_MAX_BUFFERS_PER_Q; ++j)
+		dev_kfree_skb_any(card->qdio.in_q->bufs[j].rx_skb);
 	kfree(card->qdio.in_q);
 	card->qdio.in_q = NULL;
 	/* inbound buffer pool */
-- 
1.8.4.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ