Showing error 768

User: Jiri Slaby
Error type: Invalid Pointer Dereference
Error type description: A pointer which is invalid is being dereferenced
File location: drivers/net/sunhme.c
Line in file: 3121
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:22:22 UTC


Source:

3091        dev->dma = 0;
3092
3093        /* Happy Meal can do it all... */
3094        dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM;
3095
3096#if defined(CONFIG_SBUS) && defined(CONFIG_PCI)
3097        /* Hook up PCI register/descriptor accessors. */
3098        hp->read_desc32 = pci_hme_read_desc32;
3099        hp->write_txd = pci_hme_write_txd;
3100        hp->write_rxd = pci_hme_write_rxd;
3101        hp->read32 = pci_hme_read32;
3102        hp->write32 = pci_hme_write32;
3103#endif
3104
3105        /* Grrr, Happy Meal comes up by default not advertising
3106         * full duplex 100baseT capabilities, fix this.
3107         */
3108        spin_lock_irq(&hp->happy_lock);
3109        happy_meal_set_initial_advertisement(hp);
3110        spin_unlock_irq(&hp->happy_lock);
3111
3112        if (register_netdev(hp->dev)) {
3113                printk(KERN_ERR "happymeal(PCI): Cannot register net device, "
3114                       "aborting.\n");
3115                goto err_out_iounmap;
3116        }
3117
3118        dev_set_drvdata(&pdev->dev, hp);
3119
3120        if (!qfe_slot) {
3121                struct pci_dev *qpdev = qp->quattro_dev;
3122
3123                prom_name[0] = 0;
3124                if (!strncmp(dev->name, "eth", 3)) {
3125                        int i = simple_strtoul(dev->name + 3, NULL, 10);
3126                        sprintf(prom_name, "-%d", i + 3);
3127                }
3128                printk(KERN_INFO "%s%s: Quattro HME (PCI/CheerIO) 10/100baseT Ethernet ", dev->name, prom_name);
3129                if (qpdev->vendor == PCI_VENDOR_ID_DEC &&
3130                    qpdev->device == PCI_DEVICE_ID_DEC_21153)
3131                        printk("DEC 21153 PCI Bridge\n");
Show full sources