aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2008-01-24 05:06:46 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:07:12 -0500
commit79ea13ce07c951bb4d95471e7300baa0f1be9e78 (patch)
treec0ea320464201854c5d3a222e2dd0d10ae22c95f
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>
-rw-r--r--drivers/net/3c515.c2
-rw-r--r--drivers/net/7990.c8
-rw-r--r--drivers/net/a2065.c10
-rw-r--r--drivers/net/bnx2.c4
-rw-r--r--drivers/net/cassini.c2
-rw-r--r--drivers/net/eepro100.c2
-rw-r--r--drivers/net/hamradio/6pack.c2
-rw-r--r--drivers/net/hamradio/mkiss.c2
-rw-r--r--drivers/net/hp100.c2
-rw-r--r--drivers/net/mac89x0.c2
-rw-r--r--drivers/net/mace.c10
-rw-r--r--drivers/net/netxen/netxen_nic_main.c6
-rw-r--r--drivers/net/skfp/hwmtm.c4
-rw-r--r--drivers/net/skfp/smt.c2
-rw-r--r--drivers/net/sungem.c2
-rw-r--r--drivers/net/sunhme.c2
-rw-r--r--drivers/net/tg3.c2
-rw-r--r--drivers/net/tokenring/smctr.c4
-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
-rw-r--r--drivers/net/wireless/airo.c2
-rw-r--r--drivers/net/xen-netfront.c2
24 files changed, 49 insertions, 57 deletions
diff --git a/drivers/net/3c515.c b/drivers/net/3c515.c
index 684bab781015..6ab84b661d70 100644
--- a/drivers/net/3c515.c
+++ b/drivers/net/3c515.c
@@ -1361,7 +1361,7 @@ static int boomerang_rx(struct net_device *dev)
1361 /* Check if the packet is long enough to just accept without 1361 /* Check if the packet is long enough to just accept without
1362 copying to a properly sized skbuff. */ 1362 copying to a properly sized skbuff. */
1363 if (pkt_len < rx_copybreak 1363 if (pkt_len < rx_copybreak
1364 && (skb = dev_alloc_skb(pkt_len + 4)) != 0) { 1364 && (skb = dev_alloc_skb(pkt_len + 4)) != NULL) {
1365 skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */ 1365 skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */
1366 /* 'skb_put()' points to the start of sk_buff data area. */ 1366 /* 'skb_put()' points to the start of sk_buff data area. */
1367 memcpy(skb_put(skb, pkt_len), 1367 memcpy(skb_put(skb, pkt_len),
diff --git a/drivers/net/7990.c b/drivers/net/7990.c
index 224e0bff1ae0..750a46f4bc58 100644
--- a/drivers/net/7990.c
+++ b/drivers/net/7990.c
@@ -277,8 +277,6 @@ static int lance_rx (struct net_device *dev)
277 volatile struct lance_init_block *ib = lp->init_block; 277 volatile struct lance_init_block *ib = lp->init_block;
278 volatile struct lance_rx_desc *rd; 278 volatile struct lance_rx_desc *rd;
279 unsigned char bits; 279 unsigned char bits;
280 int len = 0; /* XXX shut up gcc warnings */
281 struct sk_buff *skb = 0; /* XXX shut up gcc warnings */
282#ifdef TEST_HITS 280#ifdef TEST_HITS
283 int i; 281 int i;
284#endif 282#endif
@@ -318,10 +316,10 @@ static int lance_rx (struct net_device *dev)
318 if (bits & LE_R1_FRA) dev->stats.rx_frame_errors++; 316 if (bits & LE_R1_FRA) dev->stats.rx_frame_errors++;
319 if (bits & LE_R1_EOP) dev->stats.rx_errors++; 317 if (bits & LE_R1_EOP) dev->stats.rx_errors++;
320 } else { 318 } else {
321 len = (rd->mblength & 0xfff) - 4; 319 int len = (rd->mblength & 0xfff) - 4;
322 skb = dev_alloc_skb (len+2); 320 struct sk_buff *skb = dev_alloc_skb (len+2);
323 321
324 if (skb == 0) { 322 if (!skb) {
325 printk ("%s: Memory squeeze, deferring packet.\n", 323 printk ("%s: Memory squeeze, deferring packet.\n",
326 dev->name); 324 dev->name);
327 dev->stats.rx_dropped++; 325 dev->stats.rx_dropped++;
diff --git a/drivers/net/a2065.c b/drivers/net/a2065.c
index 18f7f815f66e..6c5719ae8cca 100644
--- a/drivers/net/a2065.c
+++ b/drivers/net/a2065.c
@@ -269,8 +269,6 @@ static int lance_rx (struct net_device *dev)
269 volatile struct lance_regs *ll = lp->ll; 269 volatile struct lance_regs *ll = lp->ll;
270 volatile struct lance_rx_desc *rd; 270 volatile struct lance_rx_desc *rd;
271 unsigned char bits; 271 unsigned char bits;
272 int len = 0; /* XXX shut up gcc warnings */
273 struct sk_buff *skb = 0; /* XXX shut up gcc warnings */
274 272
275#ifdef TEST_HITS 273#ifdef TEST_HITS
276 int i; 274 int i;
@@ -306,10 +304,10 @@ static int lance_rx (struct net_device *dev)
306 if (bits & LE_R1_FRA) dev->stats.rx_frame_errors++; 304 if (bits & LE_R1_FRA) dev->stats.rx_frame_errors++;
307 if (bits & LE_R1_EOP) dev->stats.rx_errors++; 305 if (bits & LE_R1_EOP) dev->stats.rx_errors++;
308 } else { 306 } else {
309 len = (rd->mblength & 0xfff) - 4; 307 int len = (rd->mblength & 0xfff) - 4;
310 skb = dev_alloc_skb (len+2); 308 struct sk_buff *skb = dev_alloc_skb (len+2);
311 309
312 if (skb == 0) { 310 if (!skb) {
313 printk(KERN_WARNING "%s: Memory squeeze, " 311 printk(KERN_WARNING "%s: Memory squeeze, "
314 "deferring packet.\n", dev->name); 312 "deferring packet.\n", dev->name);
315 dev->stats.rx_dropped++; 313 dev->stats.rx_dropped++;
@@ -477,7 +475,7 @@ static irqreturn_t lance_interrupt (int irq, void *dev_id)
477 return IRQ_HANDLED; 475 return IRQ_HANDLED;
478} 476}
479 477
480struct net_device *last_dev = 0; 478struct net_device *last_dev;
481 479
482static int lance_open (struct net_device *dev) 480static int lance_open (struct net_device *dev)
483{ 481{
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 94d1857d2c5d..3bb69d538ef0 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -2757,7 +2757,7 @@ bnx2_rx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget)
2757 } 2757 }
2758 2758
2759#ifdef BCM_VLAN 2759#ifdef BCM_VLAN
2760 if ((status & L2_FHDR_STATUS_L2_VLAN_TAG) && (bp->vlgrp != 0)) { 2760 if ((status & L2_FHDR_STATUS_L2_VLAN_TAG) && bp->vlgrp) {
2761 vlan_hwaccel_receive_skb(skb, bp->vlgrp, 2761 vlan_hwaccel_receive_skb(skb, bp->vlgrp,
2762 rx_hdr->l2_fhdr_vlan_tag); 2762 rx_hdr->l2_fhdr_vlan_tag);
2763 } 2763 }
@@ -5660,7 +5660,7 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev)
5660 vlan_tag_flags |= TX_BD_FLAGS_TCP_UDP_CKSUM; 5660 vlan_tag_flags |= TX_BD_FLAGS_TCP_UDP_CKSUM;
5661 } 5661 }
5662 5662
5663 if (bp->vlgrp != 0 && vlan_tx_tag_present(skb)) { 5663 if (bp->vlgrp && vlan_tx_tag_present(skb)) {
5664 vlan_tag_flags |= 5664 vlan_tag_flags |=
5665 (TX_BD_FLAGS_VLAN_TAG | (vlan_tx_tag_get(skb) << 16)); 5665 (TX_BD_FLAGS_VLAN_TAG | (vlan_tx_tag_get(skb) << 16));
5666 } 5666 }
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c
index 2bacb5e4604d..14299f8063af 100644
--- a/drivers/net/cassini.c
+++ b/drivers/net/cassini.c
@@ -5085,7 +5085,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
5085 5085
5086 /* give us access to cassini registers */ 5086 /* give us access to cassini registers */
5087 cp->regs = pci_iomap(pdev, 0, casreg_len); 5087 cp->regs = pci_iomap(pdev, 0, casreg_len);
5088 if (cp->regs == 0UL) { 5088 if (!cp->regs) {
5089 dev_err(&pdev->dev, "Cannot map device registers, aborting.\n"); 5089 dev_err(&pdev->dev, "Cannot map device registers, aborting.\n");
5090 goto err_out_free_res; 5090 goto err_out_free_res;
5091 } 5091 }
diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c
index 1548a80f917d..3003e9276976 100644
--- a/drivers/net/eepro100.c
+++ b/drivers/net/eepro100.c
@@ -1788,7 +1788,7 @@ speedo_rx(struct net_device *dev)
1788 /* Check if the packet is long enough to just accept without 1788 /* Check if the packet is long enough to just accept without
1789 copying to a properly sized skbuff. */ 1789 copying to a properly sized skbuff. */
1790 if (pkt_len < rx_copybreak 1790 if (pkt_len < rx_copybreak
1791 && (skb = dev_alloc_skb(pkt_len + 2)) != 0) { 1791 && (skb = dev_alloc_skb(pkt_len + 2)) != NULL) {
1792 skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */ 1792 skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */
1793 /* 'skb_put()' points to the start of sk_buff data area. */ 1793 /* 'skb_put()' points to the start of sk_buff data area. */
1794 pci_dma_sync_single_for_cpu(sp->pdev, sp->rx_ring_dma[entry], 1794 pci_dma_sync_single_for_cpu(sp->pdev, sp->rx_ring_dma[entry],
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
index 580cb4ab2af1..0a9b75139e0f 100644
--- a/drivers/net/hamradio/6pack.c
+++ b/drivers/net/hamradio/6pack.c
@@ -701,7 +701,7 @@ static void sixpack_close(struct tty_struct *tty)
701 sp = tty->disc_data; 701 sp = tty->disc_data;
702 tty->disc_data = NULL; 702 tty->disc_data = NULL;
703 write_unlock(&disc_data_lock); 703 write_unlock(&disc_data_lock);
704 if (sp == 0) 704 if (!sp)
705 return; 705 return;
706 706
707 /* 707 /*
diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c
index 803a3bdea0af..cfcd15af501e 100644
--- a/drivers/net/hamradio/mkiss.c
+++ b/drivers/net/hamradio/mkiss.c
@@ -821,7 +821,7 @@ static void mkiss_close(struct tty_struct *tty)
821 tty->disc_data = NULL; 821 tty->disc_data = NULL;
822 write_unlock(&disc_data_lock); 822 write_unlock(&disc_data_lock);
823 823
824 if (ax == 0) 824 if (!ax)
825 return; 825 return;
826 826
827 /* 827 /*
diff --git a/drivers/net/hp100.c b/drivers/net/hp100.c
index 49421d1cd3a5..571dd80fb850 100644
--- a/drivers/net/hp100.c
+++ b/drivers/net/hp100.c
@@ -1153,7 +1153,7 @@ static void hp100_init_pdls(struct net_device *dev)
1153 printk("hp100: %s: init pdls\n", dev->name); 1153 printk("hp100: %s: init pdls\n", dev->name);
1154#endif 1154#endif
1155 1155
1156 if (0 == lp->page_vaddr_algn) 1156 if (!lp->page_vaddr_algn)
1157 printk("hp100: %s: Warning: lp->page_vaddr_algn not initialised!\n", dev->name); 1157 printk("hp100: %s: Warning: lp->page_vaddr_algn not initialised!\n", dev->name);
1158 else { 1158 else {
1159 /* pageptr shall point into the DMA accessible memory region */ 1159 /* pageptr shall point into the DMA accessible memory region */
diff --git a/drivers/net/mac89x0.c b/drivers/net/mac89x0.c
index a19b5958cee9..2a66e5b7cebc 100644
--- a/drivers/net/mac89x0.c
+++ b/drivers/net/mac89x0.c
@@ -289,7 +289,7 @@ struct net_device * __init mac89x0_probe(int unit)
289 err = register_netdev(dev); 289 err = register_netdev(dev);
290 if (err) 290 if (err)
291 goto out1; 291 goto out1;
292 return 0; 292 return NULL;
293out1: 293out1:
294 nubus_writew(0, dev->base_addr + ADD_PORT); 294 nubus_writew(0, dev->base_addr + ADD_PORT);
295out: 295out:
diff --git a/drivers/net/mace.c b/drivers/net/mace.c
index 95ebe72f320f..451acdca2a21 100644
--- a/drivers/net/mace.c
+++ b/drivers/net/mace.c
@@ -409,7 +409,7 @@ static inline void mace_clean_rings(struct mace_data *mp)
409 409
410 /* free some skb's */ 410 /* free some skb's */
411 for (i = 0; i < N_RX_RING; ++i) { 411 for (i = 0; i < N_RX_RING; ++i) {
412 if (mp->rx_bufs[i] != 0) { 412 if (mp->rx_bufs[i] != NULL) {
413 dev_kfree_skb(mp->rx_bufs[i]); 413 dev_kfree_skb(mp->rx_bufs[i]);
414 mp->rx_bufs[i] = NULL; 414 mp->rx_bufs[i] = NULL;
415 } 415 }
@@ -441,7 +441,7 @@ static int mace_open(struct net_device *dev)
441 cp = mp->rx_cmds; 441 cp = mp->rx_cmds;
442 for (i = 0; i < N_RX_RING - 1; ++i) { 442 for (i = 0; i < N_RX_RING - 1; ++i) {
443 skb = dev_alloc_skb(RX_BUFLEN + 2); 443 skb = dev_alloc_skb(RX_BUFLEN + 2);
444 if (skb == 0) { 444 if (!skb) {
445 data = dummy_buf; 445 data = dummy_buf;
446 } else { 446 } else {
447 skb_reserve(skb, 2); /* so IP header lands on 4-byte bdry */ 447 skb_reserve(skb, 2); /* so IP header lands on 4-byte bdry */
@@ -903,7 +903,7 @@ static irqreturn_t mace_rxdma_intr(int irq, void *dev_id)
903 out_le16(&cp->command, DBDMA_STOP); 903 out_le16(&cp->command, DBDMA_STOP);
904 /* got a packet, have a look at it */ 904 /* got a packet, have a look at it */
905 skb = mp->rx_bufs[i]; 905 skb = mp->rx_bufs[i];
906 if (skb == 0) { 906 if (!skb) {
907 ++dev->stats.rx_dropped; 907 ++dev->stats.rx_dropped;
908 } else if (nb > 8) { 908 } else if (nb > 8) {
909 data = skb->data; 909 data = skb->data;
@@ -953,9 +953,9 @@ static irqreturn_t mace_rxdma_intr(int irq, void *dev_id)
953 break; 953 break;
954 cp = mp->rx_cmds + i; 954 cp = mp->rx_cmds + i;
955 skb = mp->rx_bufs[i]; 955 skb = mp->rx_bufs[i];
956 if (skb == 0) { 956 if (!skb) {
957 skb = dev_alloc_skb(RX_BUFLEN + 2); 957 skb = dev_alloc_skb(RX_BUFLEN + 2);
958 if (skb != 0) { 958 if (skb) {
959 skb_reserve(skb, 2); 959 skb_reserve(skb, 2);
960 mp->rx_bufs[i] = skb; 960 mp->rx_bufs[i] = skb;
961 } 961 }
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index 97ba14b759b4..2341b89abc4d 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -354,8 +354,8 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
354 goto err_out_free_netdev; 354 goto err_out_free_netdev;
355 } 355 }
356 356
357 if (((mem_ptr0 == 0UL) && (mem_len == NETXEN_PCI_128MB_SIZE)) || 357 if ((!mem_ptr0 && mem_len == NETXEN_PCI_128MB_SIZE) ||
358 (mem_ptr1 == 0UL) || (mem_ptr2 == 0UL)) { 358 !mem_ptr1 || !mem_ptr2) {
359 DPRINTK(ERR, 359 DPRINTK(ERR,
360 "Cannot remap adapter memory aborting.:" 360 "Cannot remap adapter memory aborting.:"
361 "0 -> %p, 1 -> %p, 2 -> %p\n", 361 "0 -> %p, 1 -> %p, 2 -> %p\n",
@@ -1337,7 +1337,7 @@ static struct pci_driver netxen_driver = {
1337 1337
1338static int __init netxen_init_module(void) 1338static int __init netxen_init_module(void)
1339{ 1339{
1340 if ((netxen_workq = create_singlethread_workqueue("netxen")) == 0) 1340 if ((netxen_workq = create_singlethread_workqueue("netxen")) == NULL)
1341 return -ENOMEM; 1341 return -ENOMEM;
1342 1342
1343 return pci_register_driver(&netxen_driver); 1343 return pci_register_driver(&netxen_driver);
diff --git a/drivers/net/skfp/hwmtm.c b/drivers/net/skfp/hwmtm.c
index 438f424e6361..8a430a366547 100644
--- a/drivers/net/skfp/hwmtm.c
+++ b/drivers/net/skfp/hwmtm.c
@@ -1746,7 +1746,7 @@ static void queue_llc_rx(struct s_smc *smc, SMbuf *mb)
1746 DB_GEN("queue_llc_rx: mb = %x",(void *)mb,0,4) ; 1746 DB_GEN("queue_llc_rx: mb = %x",(void *)mb,0,4) ;
1747 smc->os.hwm.queued_rx_frames++ ; 1747 smc->os.hwm.queued_rx_frames++ ;
1748 mb->sm_next = (SMbuf *)NULL ; 1748 mb->sm_next = (SMbuf *)NULL ;
1749 if (smc->os.hwm.llc_rx_pipe == 0) { 1749 if (smc->os.hwm.llc_rx_pipe == NULL) {
1750 smc->os.hwm.llc_rx_pipe = mb ; 1750 smc->os.hwm.llc_rx_pipe = mb ;
1751 } 1751 }
1752 else { 1752 else {
@@ -1786,7 +1786,7 @@ static void queue_txd_mb(struct s_smc *smc, SMbuf *mb)
1786 DB_GEN("_rx: queue_txd_mb = %x",(void *)mb,0,4) ; 1786 DB_GEN("_rx: queue_txd_mb = %x",(void *)mb,0,4) ;
1787 smc->os.hwm.queued_txd_mb++ ; 1787 smc->os.hwm.queued_txd_mb++ ;
1788 mb->sm_next = (SMbuf *)NULL ; 1788 mb->sm_next = (SMbuf *)NULL ;
1789 if (smc->os.hwm.txd_tx_pipe == 0) { 1789 if (smc->os.hwm.txd_tx_pipe == NULL) {
1790 smc->os.hwm.txd_tx_pipe = mb ; 1790 smc->os.hwm.txd_tx_pipe = mb ;
1791 } 1791 }
1792 else { 1792 else {
diff --git a/drivers/net/skfp/smt.c b/drivers/net/skfp/smt.c
index ced2c8f76be7..ffbfb1b79f97 100644
--- a/drivers/net/skfp/smt.c
+++ b/drivers/net/skfp/smt.c
@@ -712,7 +712,7 @@ void smt_received_pack(struct s_smc *smc, SMbuf *mb, int fs)
712 smc->mib.priv.fddiPRIVECF_Reply_Rx++ ; 712 smc->mib.priv.fddiPRIVECF_Reply_Rx++ ;
713 DB_SMT("SMT: received ECF reply from %s\n", 713 DB_SMT("SMT: received ECF reply from %s\n",
714 addr_to_string(&sm->smt_source),0) ; 714 addr_to_string(&sm->smt_source),0) ;
715 if (sm_to_para(smc,sm,SMT_P_ECHODATA) == 0) { 715 if (sm_to_para(smc,sm,SMT_P_ECHODATA) == NULL) {
716 DB_SMT("SMT: ECHODATA missing\n",0,0) ; 716 DB_SMT("SMT: ECHODATA missing\n",0,0) ;
717 break ; 717 break ;
718 } 718 }
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c
index 467d80dc3b33..97212799c513 100644
--- a/drivers/net/sungem.c
+++ b/drivers/net/sungem.c
@@ -3056,7 +3056,7 @@ static int __devinit gem_init_one(struct pci_dev *pdev,
3056 netif_carrier_off(dev); 3056 netif_carrier_off(dev);
3057 3057
3058 gp->regs = ioremap(gemreg_base, gemreg_len); 3058 gp->regs = ioremap(gemreg_base, gemreg_len);
3059 if (gp->regs == 0UL) { 3059 if (!gp->regs) {
3060 printk(KERN_ERR PFX "Cannot map device registers, " 3060 printk(KERN_ERR PFX "Cannot map device registers, "
3061 "aborting.\n"); 3061 "aborting.\n");
3062 err = -EIO; 3062 err = -EIO;
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c
index 25ce26a882d1..b4e7f30ea4e8 100644
--- a/drivers/net/sunhme.c
+++ b/drivers/net/sunhme.c
@@ -3060,7 +3060,7 @@ static int __devinit happy_meal_pci_probe(struct pci_dev *pdev,
3060 goto err_out_clear_quattro; 3060 goto err_out_clear_quattro;
3061 } 3061 }
3062 3062
3063 if ((hpreg_base = ioremap(hpreg_res, 0x8000)) == 0) { 3063 if ((hpreg_base = ioremap(hpreg_res, 0x8000)) == NULL) {
3064 printk(KERN_ERR "happymeal(PCI): Unable to remap card memory.\n"); 3064 printk(KERN_ERR "happymeal(PCI): Unable to remap card memory.\n");
3065 goto err_out_free_res; 3065 goto err_out_free_res;
3066 } 3066 }
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index a9f1640884b1..db606b603884 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -12675,7 +12675,7 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
12675 tg3reg_len = pci_resource_len(pdev, 2); 12675 tg3reg_len = pci_resource_len(pdev, 2);
12676 12676
12677 tp->aperegs = ioremap_nocache(tg3reg_base, tg3reg_len); 12677 tp->aperegs = ioremap_nocache(tg3reg_base, tg3reg_len);
12678 if (tp->aperegs == 0UL) { 12678 if (!tp->aperegs) {
12679 printk(KERN_ERR PFX "Cannot map APE registers, " 12679 printk(KERN_ERR PFX "Cannot map APE registers, "
12680 "aborting.\n"); 12680 "aborting.\n");
12681 err = -ENOMEM; 12681 err = -ENOMEM;
diff --git a/drivers/net/tokenring/smctr.c b/drivers/net/tokenring/smctr.c
index 93da3a36cde8..8909050b8ea7 100644
--- a/drivers/net/tokenring/smctr.c
+++ b/drivers/net/tokenring/smctr.c
@@ -2310,7 +2310,7 @@ static irqreturn_t smctr_interrupt(int irq, void *dev_id)
2310 && (tp->acb_head->subcmd 2310 && (tp->acb_head->subcmd
2311 == RW_TRC_STATUS_BLOCK)) 2311 == RW_TRC_STATUS_BLOCK))
2312 { 2312 {
2313 if(tp->ptr_bcn_type != 0) 2313 if(tp->ptr_bcn_type)
2314 { 2314 {
2315 *(tp->ptr_bcn_type) 2315 *(tp->ptr_bcn_type)
2316 = (__u32)((SBlock *)tp->misc_command_data)->BCN_Type; 2316 = (__u32)((SBlock *)tp->misc_command_data)->BCN_Type;
@@ -2980,7 +2980,7 @@ static int smctr_load_firmware(struct net_device *dev)
2980 return (UCODE_PRESENT); 2980 return (UCODE_PRESENT);
2981 2981
2982 /* Verify the firmware exists and is there in the right amount. */ 2982 /* Verify the firmware exists and is there in the right amount. */
2983 if((tp->ptr_ucode == 0L) 2983 if (!tp->ptr_ucode
2984 || (*(tp->ptr_ucode + UCODE_VERSION_OFFSET) < UCODE_VERSION)) 2984 || (*(tp->ptr_ucode + UCODE_VERSION_OFFSET) < UCODE_VERSION))
2985 { 2985 {
2986 return (UCODE_NOT_PRESENT); 2986 return (UCODE_NOT_PRESENT);
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*/
491 int pos; 491 int pos;
492 int timeout = 500000; 492 int timeout = 500000;
493 493
494 if(xc.data == 0x0){ 494 if (!xc.data) {
495 ret = -EINVAL; 495 ret = -EINVAL;
496 break; 496 break;
497 } 497 }
498 498
499 data = kmalloc(xc.len, GFP_KERNEL); 499 data = kmalloc(xc.len, GFP_KERNEL);
500 if(data == 0x0){ 500 if (!data) {
501 printk(KERN_WARNING "%s: Failed to allocate memory for copy\n", dev->name); 501 printk(KERN_WARNING "%s: Failed to allocate memory for copy\n", dev->name);
502 ret = -ENOMEM; 502 ret = -ENOMEM;
503 break; 503 break;
@@ -1643,7 +1643,7 @@ static int lmc_rx (struct net_device *dev) /*fold00*/
1643 * just allocate an skb buff and continue. 1643 * just allocate an skb buff and continue.
1644 */ 1644 */
1645 1645
1646 if(skb == 0x0){ 1646 if (!skb) {
1647 nsb = dev_alloc_skb (LMC_PKT_BUF_SZ + 2); 1647 nsb = dev_alloc_skb (LMC_PKT_BUF_SZ + 2);
1648 if (nsb) { 1648 if (nsb) {
1649 sc->lmc_rxq[i] = nsb; 1649 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)
1219static void 1219static void
1220lmc_set_protocol (lmc_softc_t * const sc, lmc_ctl_t * ctl) 1220lmc_set_protocol (lmc_softc_t * const sc, lmc_ctl_t * ctl)
1221{ 1221{
1222 if (ctl == 0) 1222 if (!ctl)
1223 { 1223 sc->ictl.keepalive_onoff = LMC_CTL_ON;
1224 sc->ictl.keepalive_onoff = LMC_CTL_ON;
1225
1226 return;
1227 }
1228} 1224}
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)
2365 2365
2366static irqreturn_t cpc_intr(int irq, void *dev_id) 2366static irqreturn_t cpc_intr(int irq, void *dev_id)
2367{ 2367{
2368 pc300_t *card; 2368 pc300_t *card = dev_id;
2369 volatile ucchar plx_status; 2369 volatile ucchar plx_status;
2370 2370
2371 if ((card = (pc300_t *) dev_id) == 0) { 2371 if (!card) {
2372#ifdef PC300_DEBUG_INTR 2372#ifdef PC300_DEBUG_INTR
2373 printk("cpc_intr: spurious intr %d\n", irq); 2373 printk("cpc_intr: spurious intr %d\n", irq);
2374#endif 2374#endif
2375 return IRQ_NONE; /* spurious intr */ 2375 return IRQ_NONE; /* spurious intr */
2376 } 2376 }
2377 2377
2378 if (card->hw.rambase == 0) { 2378 if (!card->hw.rambase) {
2379#ifdef PC300_DEBUG_INTR 2379#ifdef PC300_DEBUG_INTR
2380 printk("cpc_intr: spurious intr2 %d\n", irq); 2380 printk("cpc_intr: spurious intr2 %d\n", irq);
2381#endif 2381#endif
@@ -3648,7 +3648,7 @@ static void __devexit cpc_remove_one(struct pci_dev *pdev)
3648{ 3648{
3649 pc300_t *card = pci_get_drvdata(pdev); 3649 pc300_t *card = pci_get_drvdata(pdev);
3650 3650
3651 if (card->hw.rambase != 0) { 3651 if (card->hw.rambase) {
3652 int i; 3652 int i;
3653 3653
3654 /* Disable interrupts on the PCI bridge */ 3654 /* 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)
313 if (cpc_tty->num_open == 0) { /* first open of this tty */ 313 if (cpc_tty->num_open == 0) { /* first open of this tty */
314 if (!cpc_tty_area[port].buf_tx){ 314 if (!cpc_tty_area[port].buf_tx){
315 cpc_tty_area[port].buf_tx = kmalloc(CPC_TTY_MAX_MTU,GFP_KERNEL); 315 cpc_tty_area[port].buf_tx = kmalloc(CPC_TTY_MAX_MTU,GFP_KERNEL);
316 if (cpc_tty_area[port].buf_tx == 0){ 316 if (!cpc_tty_area[port].buf_tx) {
317 CPC_TTY_DBG("%s: error in memory allocation\n",cpc_tty->name); 317 CPC_TTY_DBG("%s: error in memory allocation\n",cpc_tty->name);
318 return -ENOMEM; 318 return -ENOMEM;
319 } 319 }
@@ -678,7 +678,7 @@ static void cpc_tty_rx_work(struct work_struct *work)
678 for (j=0; j < CPC_TTY_NPORTS; j++) { 678 for (j=0; j < CPC_TTY_NPORTS; j++) {
679 cpc_tty = &cpc_tty_area[port]; 679 cpc_tty = &cpc_tty_area[port];
680 680
681 if ((buf=cpc_tty->buf_rx.first) != 0) { 681 if ((buf=cpc_tty->buf_rx.first) != NULL) {
682 if (cpc_tty->tty) { 682 if (cpc_tty->tty) {
683 ld = tty_ldisc_ref(cpc_tty->tty); 683 ld = tty_ldisc_ref(cpc_tty->tty);
684 if (ld) { 684 if (ld) {
@@ -784,7 +784,7 @@ void cpc_tty_receive(pc300dev_t *pc300dev)
784 } 784 }
785 785
786 new = kmalloc(rx_len + sizeof(st_cpc_rx_buf), GFP_ATOMIC); 786 new = kmalloc(rx_len + sizeof(st_cpc_rx_buf), GFP_ATOMIC);
787 if (new == 0) { 787 if (!new) {
788 cpc_tty_rx_disc_frame(pc300chan); 788 cpc_tty_rx_disc_frame(pc300chan);
789 continue; 789 continue;
790 } 790 }
@@ -863,7 +863,7 @@ void cpc_tty_receive(pc300dev_t *pc300dev)
863 } 863 }
864 new->size = rx_len; 864 new->size = rx_len;
865 new->next = NULL; 865 new->next = NULL;
866 if (cpc_tty->buf_rx.first == 0) { 866 if (cpc_tty->buf_rx.first == NULL) {
867 cpc_tty->buf_rx.first = new; 867 cpc_tty->buf_rx.first = new;
868 cpc_tty->buf_rx.last = new; 868 cpc_tty->buf_rx.last = new;
869 } else { 869 } else {
@@ -891,7 +891,7 @@ static void cpc_tty_tx_work(struct work_struct *work)
891 891
892 CPC_TTY_DBG("%s: cpc_tty_tx_work init\n",cpc_tty->name); 892 CPC_TTY_DBG("%s: cpc_tty_tx_work init\n",cpc_tty->name);
893 893
894 if ((tty = cpc_tty->tty) == 0) { 894 if ((tty = cpc_tty->tty) == NULL) {
895 CPC_TTY_DBG("%s: the interface is not opened\n",cpc_tty->name); 895 CPC_TTY_DBG("%s: the interface is not opened\n",cpc_tty->name);
896 return; 896 return;
897 } 897 }
@@ -1027,7 +1027,7 @@ void cpc_tty_unregister_service(pc300dev_t *pc300dev)
1027 ulong flags; 1027 ulong flags;
1028 int res; 1028 int res;
1029 1029
1030 if ((cpc_tty= (st_cpc_tty_area *) pc300dev->cpc_tty) == 0) { 1030 if ((cpc_tty= (st_cpc_tty_area *) pc300dev->cpc_tty) == NULL) {
1031 CPC_TTY_DBG("%s: interface is not TTY\n", pc300dev->dev->name); 1031 CPC_TTY_DBG("%s: interface is not TTY\n", pc300dev->dev->name);
1032 return; 1032 return;
1033 } 1033 }
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 42670acd144b..be9aa4efeca5 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -2032,7 +2032,7 @@ static int mpi_send_packet (struct net_device *dev)
2032 2032
2033 /* get a packet to send */ 2033 /* get a packet to send */
2034 2034
2035 if ((skb = skb_dequeue(&ai->txq)) == 0) { 2035 if ((skb = skb_dequeue(&ai->txq)) == NULL) {
2036 airo_print_err(dev->name, 2036 airo_print_err(dev->name,
2037 "%s: Dequeue'd zero in send_packet()", 2037 "%s: Dequeue'd zero in send_packet()",
2038 __FUNCTION__); 2038 __FUNCTION__);
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index bca37bf0f545..7483d45bc5bc 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -1073,7 +1073,7 @@ static void xennet_release_rx_bufs(struct netfront_info *np)
1073 if (!xen_feature(XENFEAT_auto_translated_physmap)) { 1073 if (!xen_feature(XENFEAT_auto_translated_physmap)) {
1074 /* Do all the remapping work and M2P updates. */ 1074 /* Do all the remapping work and M2P updates. */
1075 MULTI_mmu_update(mcl, np->rx_mmu, mmu - np->rx_mmu, 1075 MULTI_mmu_update(mcl, np->rx_mmu, mmu - np->rx_mmu,
1076 0, DOMID_SELF); 1076 NULL, DOMID_SELF);
1077 mcl++; 1077 mcl++;
1078 HYPERVISOR_multicall(np->rx_mcl, mcl - np->rx_mcl); 1078 HYPERVISOR_multicall(np->rx_mcl, mcl - np->rx_mcl);
1079 } 1079 }