···13611361 /* Check if the packet is long enough to just accept without13621362 copying to a properly sized skbuff. */13631363 if (pkt_len < rx_copybreak13641364- && (skb = dev_alloc_skb(pkt_len + 4)) != 0) {13641364+ && (skb = dev_alloc_skb(pkt_len + 4)) != NULL) {13651365 skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */13661366 /* 'skb_put()' points to the start of sk_buff data area. */13671367 memcpy(skb_put(skb, pkt_len),
+3-5
drivers/net/7990.c
···277277 volatile struct lance_init_block *ib = lp->init_block;278278 volatile struct lance_rx_desc *rd;279279 unsigned char bits;280280- int len = 0; /* XXX shut up gcc warnings */281281- struct sk_buff *skb = 0; /* XXX shut up gcc warnings */282280#ifdef TEST_HITS283281 int i;284282#endif···316318 if (bits & LE_R1_FRA) dev->stats.rx_frame_errors++;317319 if (bits & LE_R1_EOP) dev->stats.rx_errors++;318320 } else {319319- len = (rd->mblength & 0xfff) - 4;320320- skb = dev_alloc_skb (len+2);321321+ int len = (rd->mblength & 0xfff) - 4;322322+ struct sk_buff *skb = dev_alloc_skb (len+2);321323322322- if (skb == 0) {324324+ if (!skb) {323325 printk ("%s: Memory squeeze, deferring packet.\n",324326 dev->name);325327 dev->stats.rx_dropped++;
+4-6
drivers/net/a2065.c
···269269 volatile struct lance_regs *ll = lp->ll;270270 volatile struct lance_rx_desc *rd;271271 unsigned char bits;272272- int len = 0; /* XXX shut up gcc warnings */273273- struct sk_buff *skb = 0; /* XXX shut up gcc warnings */274272275273#ifdef TEST_HITS276274 int i;···304306 if (bits & LE_R1_FRA) dev->stats.rx_frame_errors++;305307 if (bits & LE_R1_EOP) dev->stats.rx_errors++;306308 } else {307307- len = (rd->mblength & 0xfff) - 4;308308- skb = dev_alloc_skb (len+2);309309+ int len = (rd->mblength & 0xfff) - 4;310310+ struct sk_buff *skb = dev_alloc_skb (len+2);309311310310- if (skb == 0) {312312+ if (!skb) {311313 printk(KERN_WARNING "%s: Memory squeeze, "312314 "deferring packet.\n", dev->name);313315 dev->stats.rx_dropped++;···475477 return IRQ_HANDLED;476478}477479478478-struct net_device *last_dev = 0;480480+struct net_device *last_dev;479481480482static int lance_open (struct net_device *dev)481483{
···5085508550865086 /* give us access to cassini registers */50875087 cp->regs = pci_iomap(pdev, 0, casreg_len);50885088- if (cp->regs == 0UL) {50885088+ if (!cp->regs) {50895089 dev_err(&pdev->dev, "Cannot map device registers, aborting.\n");50905090 goto err_out_free_res;50915091 }
+1-1
drivers/net/eepro100.c
···17881788 /* Check if the packet is long enough to just accept without17891789 copying to a properly sized skbuff. */17901790 if (pkt_len < rx_copybreak17911791- && (skb = dev_alloc_skb(pkt_len + 2)) != 0) {17911791+ && (skb = dev_alloc_skb(pkt_len + 2)) != NULL) {17921792 skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */17931793 /* 'skb_put()' points to the start of sk_buff data area. */17941794 pci_dma_sync_single_for_cpu(sp->pdev, sp->rx_ring_dma[entry],
···11531153 printk("hp100: %s: init pdls\n", dev->name);11541154#endif1155115511561156- if (0 == lp->page_vaddr_algn)11561156+ if (!lp->page_vaddr_algn)11571157 printk("hp100: %s: Warning: lp->page_vaddr_algn not initialised!\n", dev->name);11581158 else {11591159 /* pageptr shall point into the DMA accessible memory region */
···30603060 goto err_out_clear_quattro;30613061 }3062306230633063- if ((hpreg_base = ioremap(hpreg_res, 0x8000)) == 0) {30633063+ if ((hpreg_base = ioremap(hpreg_res, 0x8000)) == NULL) {30643064 printk(KERN_ERR "happymeal(PCI): Unable to remap card memory.\n");30653065 goto err_out_free_res;30663066 }
+1-1
drivers/net/tg3.c
···1267512675 tg3reg_len = pci_resource_len(pdev, 2);12676126761267712677 tp->aperegs = ioremap_nocache(tg3reg_base, tg3reg_len);1267812678- if (tp->aperegs == 0UL) {1267812678+ if (!tp->aperegs) {1267912679 printk(KERN_ERR PFX "Cannot map APE registers, "1268012680 "aborting.\n");1268112681 err = -ENOMEM;
+2-2
drivers/net/tokenring/smctr.c
···23102310 && (tp->acb_head->subcmd23112311 == RW_TRC_STATUS_BLOCK))23122312 {23132313- if(tp->ptr_bcn_type != 0)23132313+ if(tp->ptr_bcn_type)23142314 {23152315 *(tp->ptr_bcn_type)23162316 = (__u32)((SBlock *)tp->misc_command_data)->BCN_Type;···29802980 return (UCODE_PRESENT);2981298129822982 /* Verify the firmware exists and is there in the right amount. */29832983- if((tp->ptr_ucode == 0L)29832983+ if (!tp->ptr_ucode29842984 || (*(tp->ptr_ucode + UCODE_VERSION_OFFSET) < UCODE_VERSION))29852985 {29862986 return (UCODE_NOT_PRESENT);
+3-3
drivers/net/wan/lmc/lmc_main.c
···491491 int pos;492492 int timeout = 500000;493493494494- if(xc.data == 0x0){494494+ if (!xc.data) {495495 ret = -EINVAL;496496 break;497497 }498498499499 data = kmalloc(xc.len, GFP_KERNEL);500500- if(data == 0x0){500500+ if (!data) {501501 printk(KERN_WARNING "%s: Failed to allocate memory for copy\n", dev->name);502502 ret = -ENOMEM;503503 break;···16431643 * just allocate an skb buff and continue.16441644 */1645164516461646- if(skb == 0x0){16461646+ if (!skb) {16471647 nsb = dev_alloc_skb (LMC_PKT_BUF_SZ + 2);16481648 if (nsb) {16491649 sc->lmc_rxq[i] = nsb;
···2365236523662366static irqreturn_t cpc_intr(int irq, void *dev_id)23672367{23682368- pc300_t *card;23682368+ pc300_t *card = dev_id;23692369 volatile ucchar plx_status;2370237023712371- if ((card = (pc300_t *) dev_id) == 0) {23712371+ if (!card) {23722372#ifdef PC300_DEBUG_INTR23732373 printk("cpc_intr: spurious intr %d\n", irq);23742374#endif23752375 return IRQ_NONE; /* spurious intr */23762376 }2377237723782378- if (card->hw.rambase == 0) {23782378+ if (!card->hw.rambase) {23792379#ifdef PC300_DEBUG_INTR23802380 printk("cpc_intr: spurious intr2 %d\n", irq);23812381#endif···36483648{36493649 pc300_t *card = pci_get_drvdata(pdev);3650365036513651- if (card->hw.rambase != 0) {36513651+ if (card->hw.rambase) {36523652 int i;3653365336543654 /* Disable interrupts on the PCI bridge */
+6-6
drivers/net/wan/pc300_tty.c
···313313 if (cpc_tty->num_open == 0) { /* first open of this tty */314314 if (!cpc_tty_area[port].buf_tx){315315 cpc_tty_area[port].buf_tx = kmalloc(CPC_TTY_MAX_MTU,GFP_KERNEL);316316- if (cpc_tty_area[port].buf_tx == 0){316316+ if (!cpc_tty_area[port].buf_tx) {317317 CPC_TTY_DBG("%s: error in memory allocation\n",cpc_tty->name);318318 return -ENOMEM;319319 }···678678 for (j=0; j < CPC_TTY_NPORTS; j++) {679679 cpc_tty = &cpc_tty_area[port];680680681681- if ((buf=cpc_tty->buf_rx.first) != 0) {681681+ if ((buf=cpc_tty->buf_rx.first) != NULL) {682682 if (cpc_tty->tty) {683683 ld = tty_ldisc_ref(cpc_tty->tty);684684 if (ld) {···784784 } 785785786786 new = kmalloc(rx_len + sizeof(st_cpc_rx_buf), GFP_ATOMIC);787787- if (new == 0) {787787+ if (!new) {788788 cpc_tty_rx_disc_frame(pc300chan);789789 continue;790790 }···863863 } 864864 new->size = rx_len;865865 new->next = NULL;866866- if (cpc_tty->buf_rx.first == 0) {866866+ if (cpc_tty->buf_rx.first == NULL) {867867 cpc_tty->buf_rx.first = new;868868 cpc_tty->buf_rx.last = new;869869 } else {···891891892892 CPC_TTY_DBG("%s: cpc_tty_tx_work init\n",cpc_tty->name);893893894894- if ((tty = cpc_tty->tty) == 0) { 894894+ if ((tty = cpc_tty->tty) == NULL) { 895895 CPC_TTY_DBG("%s: the interface is not opened\n",cpc_tty->name);896896 return; 897897 }···10271027 ulong flags;10281028 int res;1029102910301030- if ((cpc_tty= (st_cpc_tty_area *) pc300dev->cpc_tty) == 0) { 10301030+ if ((cpc_tty= (st_cpc_tty_area *) pc300dev->cpc_tty) == NULL) {10311031 CPC_TTY_DBG("%s: interface is not TTY\n", pc300dev->dev->name);10321032 return; 10331033 }
+1-1
drivers/net/wireless/airo.c
···2032203220332033 /* get a packet to send */2034203420352035- if ((skb = skb_dequeue(&ai->txq)) == 0) {20352035+ if ((skb = skb_dequeue(&ai->txq)) == NULL) {20362036 airo_print_err(dev->name,20372037 "%s: Dequeue'd zero in send_packet()",20382038 __FUNCTION__);
+1-1
drivers/net/xen-netfront.c
···10731073 if (!xen_feature(XENFEAT_auto_translated_physmap)) {10741074 /* Do all the remapping work and M2P updates. */10751075 MULTI_mmu_update(mcl, np->rx_mmu, mmu - np->rx_mmu,10761076- 0, DOMID_SELF);10761076+ NULL, DOMID_SELF);10771077 mcl++;10781078 HYPERVISOR_multicall(np->rx_mcl, mcl - np->rx_mcl);10791079 }