- remove-unnecessary-check-in-drivers-net-depcac.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     Remove unnecessary check in drivers/net/depca.c

has been removed from the -mm tree.  Its filename is

     remove-unnecessary-check-in-drivers-net-depcac.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: Remove unnecessary check in drivers/net/depca.c
From: Eric Sesterhenn <snakebyte@xxxxxx>

This was spotted by coverity (cid #793).  All callers dereference dev
before calling this functions, and we dereference it earlier in the
function, when initializing lp.

Signed-off-by: Eric Sesterhenn <snakebyte@xxxxxx>
Cc: Jeff Garzik <jeff@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/net/depca.c |   28 +++++++++++++---------------
 1 files changed, 13 insertions(+), 15 deletions(-)

diff -puN drivers/net/depca.c~remove-unnecessary-check-in-drivers-net-depcac drivers/net/depca.c
--- a/drivers/net/depca.c~remove-unnecessary-check-in-drivers-net-depcac
+++ a/drivers/net/depca.c
@@ -1252,24 +1252,22 @@ static void set_multicast_list(struct ne
 	struct depca_private *lp = (struct depca_private *) dev->priv;
 	u_long ioaddr = dev->base_addr;
 
-	if (dev) {
-		netif_stop_queue(dev);
-		while (lp->tx_old != lp->tx_new);	/* Wait for the ring to empty */
+	netif_stop_queue(dev);
+	while (lp->tx_old != lp->tx_new);	/* Wait for the ring to empty */
 
-		STOP_DEPCA;	/* Temporarily stop the depca.  */
-		depca_init_ring(dev);	/* Initialize the descriptor rings */
-
-		if (dev->flags & IFF_PROMISC) {	/* Set promiscuous mode */
-			lp->init_block.mode |= PROM;
-		} else {
-			SetMulticastFilter(dev);
-			lp->init_block.mode &= ~PROM;	/* Unset promiscuous mode */
-		}
+	STOP_DEPCA;	/* Temporarily stop the depca.  */
+	depca_init_ring(dev);	/* Initialize the descriptor rings */
 
-		LoadCSRs(dev);	/* Reload CSR3 */
-		InitRestartDepca(dev);	/* Resume normal operation. */
-		netif_start_queue(dev);	/* Unlock the TX ring */
+	if (dev->flags & IFF_PROMISC) {	/* Set promiscuous mode */
+		lp->init_block.mode |= PROM;
+	} else {
+		SetMulticastFilter(dev);
+		lp->init_block.mode &= ~PROM;	/* Unset promiscuous mode */
 	}
+
+	LoadCSRs(dev);	/* Reload CSR3 */
+	InitRestartDepca(dev);	/* Resume normal operation. */
+	netif_start_queue(dev);	/* Unlock the TX ring */
 }
 
 /*
_

Patches currently in -mm which might be from snakebyte@xxxxxx are

origin.patch
null-dereference-in-fs-jbd2-journalc.patch
remove-unnecessary-check-in-drivers-video-intelfb-intelfbhwc.patch
git-netdev-all.patch
off-by-one-in-arch-ppc-platforms-mpc8.patch
remove-unnecessary-check-in-drivers-scsi-sgc.patch
dereference-in-drivers-scsi-lpfc-lpfc_ctc.patch
memory-leak-in-drivers-usb-serial-airprimec.patch
possible-dereference-in-drivers-net-wireless-zd1201c.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux