summaryrefslogtreecommitdiff
path: root/drivers/net/wan
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2008-01-24 02:06:46 -0800
committerDavid S. Miller <davem@davemloft.net>2008-01-28 15:07:12 -0800
commit79ea13ce07c951bb4d95471e7300baa0f1be9e78 (patch)
treec0ea320464201854c5d3a222e2dd0d10ae22c95f /drivers/net/wan
parent3e18826c73735eee5fca92584137824d9a387008 (diff)
NULL noise in drivers/net
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan')
-rw-r--r--drivers/net/wan/lmc/lmc_main.c6
-rw-r--r--drivers/net/wan/lmc/lmc_media.c8
-rw-r--r--drivers/net/wan/pc300_drv.c8
-rw-r--r--drivers/net/wan/pc300_tty.c12
4 files changed, 15 insertions, 19 deletions
diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c
index 37c52e131750..6635ecef36e5 100644
--- a/drivers/net/wan/lmc/lmc_main.c
+++ b/drivers/net/wan/lmc/lmc_main.c
@@ -491,13 +491,13 @@ int lmc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/
int pos;
int timeout = 500000;
- if(xc.data == 0x0){
+ if (!xc.data) {
ret = -EINVAL;
break;
}
data = kmalloc(xc.len, GFP_KERNEL);
- if(data == 0x0){
+ if (!data) {
printk(KERN_WARNING "%s: Failed to allocate memory for copy\n", dev->name);
ret = -ENOMEM;
break;
@@ -1643,7 +1643,7 @@ static int lmc_rx (struct net_device *dev) /*fold00*/
* just allocate an skb buff and continue.
*/
- if(skb == 0x0){
+ if (!skb) {
nsb = dev_alloc_skb (LMC_PKT_BUF_SZ + 2);
if (nsb) {
sc->lmc_rxq[i] = nsb;
diff --git a/drivers/net/wan/lmc/lmc_media.c b/drivers/net/wan/lmc/lmc_media.c
index c9c878cd5c72..8aa461c941ce 100644
--- a/drivers/net/wan/lmc/lmc_media.c
+++ b/drivers/net/wan/lmc/lmc_media.c
@@ -1219,10 +1219,6 @@ lmc_t1_watchdog (lmc_softc_t * const sc)
static void
lmc_set_protocol (lmc_softc_t * const sc, lmc_ctl_t * ctl)
{
- if (ctl == 0)
- {
- sc->ictl.keepalive_onoff = LMC_CTL_ON;
-
- return;
- }
+ if (!ctl)
+ sc->ictl.keepalive_onoff = LMC_CTL_ON;
}
diff --git a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c
index 99fee2f1d019..57914fbd41d3 100644
--- a/drivers/net/wan/pc300_drv.c
+++ b/drivers/net/wan/pc300_drv.c
@@ -2365,17 +2365,17 @@ static void falc_intr(pc300_t * card)
static irqreturn_t cpc_intr(int irq, void *dev_id)
{
- pc300_t *card;
+ pc300_t *card = dev_id;
volatile ucchar plx_status;
- if ((card = (pc300_t *) dev_id) == 0) {
+ if (!card) {
#ifdef PC300_DEBUG_INTR
printk("cpc_intr: spurious intr %d\n", irq);
#endif
return IRQ_NONE; /* spurious intr */
}
- if (card->hw.rambase == 0) {
+ if (!card->hw.rambase) {
#ifdef PC300_DEBUG_INTR
printk("cpc_intr: spurious intr2 %d\n", irq);
#endif
@@ -3648,7 +3648,7 @@ static void __devexit cpc_remove_one(struct pci_dev *pdev)
{
pc300_t *card = pci_get_drvdata(pdev);
- if (card->hw.rambase != 0) {
+ if (card->hw.rambase) {
int i;
/* Disable interrupts on the PCI bridge */
diff --git a/drivers/net/wan/pc300_tty.c b/drivers/net/wan/pc300_tty.c
index e24a7b095dd6..63abfd72542d 100644
--- a/drivers/net/wan/pc300_tty.c
+++ b/drivers/net/wan/pc300_tty.c
@@ -313,7 +313,7 @@ static int cpc_tty_open(struct tty_struct *tty, struct file *flip)
if (cpc_tty->num_open == 0) { /* first open of this tty */
if (!cpc_tty_area[port].buf_tx){
cpc_tty_area[port].buf_tx = kmalloc(CPC_TTY_MAX_MTU,GFP_KERNEL);
- if (cpc_tty_area[port].buf_tx == 0){
+ if (!cpc_tty_area[port].buf_tx) {
CPC_TTY_DBG("%s: error in memory allocation\n",cpc_tty->name);
return -ENOMEM;
}
@@ -678,7 +678,7 @@ static void cpc_tty_rx_work(struct work_struct *work)
for (j=0; j < CPC_TTY_NPORTS; j++) {
cpc_tty = &cpc_tty_area[port];
- if ((buf=cpc_tty->buf_rx.first) != 0) {
+ if ((buf=cpc_tty->buf_rx.first) != NULL) {
if (cpc_tty->tty) {
ld = tty_ldisc_ref(cpc_tty->tty);
if (ld) {
@@ -784,7 +784,7 @@ void cpc_tty_receive(pc300dev_t *pc300dev)
}
new = kmalloc(rx_len + sizeof(st_cpc_rx_buf), GFP_ATOMIC);
- if (new == 0) {
+ if (!new) {
cpc_tty_rx_disc_frame(pc300chan);
continue;
}
@@ -863,7 +863,7 @@ void cpc_tty_receive(pc300dev_t *pc300dev)
}
new->size = rx_len;
new->next = NULL;
- if (cpc_tty->buf_rx.first == 0) {
+ if (cpc_tty->buf_rx.first == NULL) {
cpc_tty->buf_rx.first = new;
cpc_tty->buf_rx.last = new;
} else {
@@ -891,7 +891,7 @@ static void cpc_tty_tx_work(struct work_struct *work)
CPC_TTY_DBG("%s: cpc_tty_tx_work init\n",cpc_tty->name);
- if ((tty = cpc_tty->tty) == 0) {
+ if ((tty = cpc_tty->tty) == NULL) {
CPC_TTY_DBG("%s: the interface is not opened\n",cpc_tty->name);
return;
}
@@ -1027,7 +1027,7 @@ void cpc_tty_unregister_service(pc300dev_t *pc300dev)
ulong flags;
int res;
- if ((cpc_tty= (st_cpc_tty_area *) pc300dev->cpc_tty) == 0) {
+ if ((cpc_tty= (st_cpc_tty_area *) pc300dev->cpc_tty) == NULL) {
CPC_TTY_DBG("%s: interface is not TTY\n", pc300dev->dev->name);
return;
}