Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 807540ba authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

drivers/net: return operator cleanup



Change "return (EXPR);" to "return EXPR;"

return is not a function, parentheses are not required.

Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cb4dfe56
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -463,7 +463,7 @@ static int __init do_elmc_probe(struct net_device *dev)

	/* we didn't find any 3c523 in the slots we checked for */
	if (slot == MCA_NOTFOUND)
		return ((base_addr || irq) ? -ENXIO : -ENODEV);
		return (base_addr || irq) ? -ENXIO : -ENODEV;

	mca_set_adapter_name(slot, "3Com 3c523 Etherlink/MC");
	mca_set_adapter_procfn(slot, (MCA_ProcFn) elmc_getinfo, dev);
+5 −5
Original line number Diff line number Diff line
@@ -244,7 +244,7 @@ static int ipddp_delete(struct ipddp_route *rt)
        }

	spin_unlock_bh(&ipddp_route_lock);
        return (-ENOENT);
        return -ENOENT;
}

/*
@@ -259,10 +259,10 @@ static struct ipddp_route* __ipddp_find_route(struct ipddp_route *rt)
                if(f->ip == rt->ip &&
		   f->at.s_net == rt->at.s_net &&
		   f->at.s_node == rt->at.s_node)
                        return (f);
                        return f;
        }

        return (NULL);
        return NULL;
}

static int ipddp_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
@@ -279,7 +279,7 @@ static int ipddp_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
        switch(cmd)
        {
		case SIOCADDIPDDPRT:
                        return (ipddp_create(&rcp));
                        return ipddp_create(&rcp);

                case SIOCFINDIPDDPRT:
			spin_lock_bh(&ipddp_route_lock);
@@ -297,7 +297,7 @@ static int ipddp_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
				return -ENOENT;

                case SIOCDELIPDDPRT:
                        return (ipddp_delete(&rcp));
                        return ipddp_delete(&rcp);

                default:
                        return -EINVAL;
+1 −1
Original line number Diff line number Diff line
@@ -727,7 +727,7 @@ static int sendup_buffer (struct net_device *dev)

	if (ltc->command != LT_RCVLAP) {
		printk("unknown command 0x%02x from ltpc card\n",ltc->command);
		return(-1);
		return -1;
	}
	dnode = ltc->dnode;
	snode = ltc->snode;
+12 −12
Original line number Diff line number Diff line
@@ -362,7 +362,7 @@ static void *slow_memcpy( void *dst, const void *src, size_t len )
		*cto++ = *cfrom++;
		MFPDELAY();
	}
	return( dst );
	return dst;
}


@@ -449,7 +449,7 @@ static noinline int __init addr_accessible(volatile void *regp, int wordflag,
	vbr[2] = save_berr;
	local_irq_restore(flags);

	return( ret );
	return ret;
}

static const struct net_device_ops lance_netdev_ops = {
@@ -526,7 +526,7 @@ static unsigned long __init lance_probe1( struct net_device *dev,
	goto probe_ok;

  probe_fail:
	return( 0 );
	return 0;

  probe_ok:
	lp = netdev_priv(dev);
@@ -556,7 +556,7 @@ static unsigned long __init lance_probe1( struct net_device *dev,
		if (request_irq(IRQ_AUTO_5, lance_interrupt, IRQ_TYPE_PRIO,
		            "PAM/Riebl-ST Ethernet", dev)) {
			printk( "Lance: request for irq %d failed\n", IRQ_AUTO_5 );
			return( 0 );
			return 0;
		}
		dev->irq = (unsigned short)IRQ_AUTO_5;
	}
@@ -568,12 +568,12 @@ static unsigned long __init lance_probe1( struct net_device *dev,
		unsigned long irq = atari_register_vme_int();
		if (!irq) {
			printk( "Lance: request for VME interrupt failed\n" );
			return( 0 );
			return 0;
		}
		if (request_irq(irq, lance_interrupt, IRQ_TYPE_PRIO,
		            "Riebl-VME Ethernet", dev)) {
			printk( "Lance: request for irq %ld failed\n", irq );
			return( 0 );
			return 0;
		}
		dev->irq = irq;
	}
@@ -637,7 +637,7 @@ static unsigned long __init lance_probe1( struct net_device *dev,
	/* XXX MSch */
	dev->watchdog_timeo = TX_TIMEOUT;

	return( 1 );
	return 1;
}


@@ -666,7 +666,7 @@ static int lance_open( struct net_device *dev )
		DPRINTK( 2, ( "lance_open(): opening %s failed, i=%d, csr0=%04x\n",
					  dev->name, i, DREG ));
		DREG = CSR0_STOP;
		return( -EIO );
		return -EIO;
	}
	DREG = CSR0_IDON;
	DREG = CSR0_STRT;
@@ -676,7 +676,7 @@ static int lance_open( struct net_device *dev )

	DPRINTK( 2, ( "%s: LANCE is open, csr0 %04x\n", dev->name, DREG ));

	return( 0 );
	return 0;
}


@@ -1126,13 +1126,13 @@ static int lance_set_mac_address( struct net_device *dev, void *addr )
	int i;

	if (lp->cardtype != OLD_RIEBL && lp->cardtype != NEW_RIEBL)
		return( -EOPNOTSUPP );
		return -EOPNOTSUPP;

	if (netif_running(dev)) {
		/* Only possible while card isn't started */
		DPRINTK( 1, ( "%s: hwaddr can be set only while card isn't open.\n",
					  dev->name ));
		return( -EIO );
		return -EIO;
	}

	memcpy( dev->dev_addr, saddr->sa_data, dev->addr_len );
@@ -1142,7 +1142,7 @@ static int lance_set_mac_address( struct net_device *dev, void *addr )
	/* set also the magic for future sessions */
	*RIEBL_MAGIC_ADDR = RIEBL_MAGIC;

	return( 0 );
	return 0;
}


+2 −2
Original line number Diff line number Diff line
@@ -2094,9 +2094,9 @@ static u16 atl1_tpd_avail(struct atl1_tpd_ring *tpd_ring)
{
	u16 next_to_clean = atomic_read(&tpd_ring->next_to_clean);
	u16 next_to_use = atomic_read(&tpd_ring->next_to_use);
	return ((next_to_clean > next_to_use) ?
	return (next_to_clean > next_to_use) ?
		next_to_clean - next_to_use - 1 :
		tpd_ring->count + next_to_clean - next_to_use - 1);
		tpd_ring->count + next_to_clean - next_to_use - 1;
}

static int atl1_tso(struct atl1_adapter *adapter, struct sk_buff *skb,
Loading