Showing error 761

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


Source:

1710        }
1711#ifdef CONFIG_ISDN_PPP
1712        if (minor <= ISDN_MINOR_PPPMAX)
1713                return (isdn_ppp_ioctl(minor - ISDN_MINOR_PPP, file, cmd, arg));
1714#endif
1715        return -ENODEV;
1716
1717#undef name
1718#undef bname
1719#undef iocts
1720#undef phone
1721#undef cfg
1722}
1723
1724/*
1725 * Open the device code.
1726 */
1727static int
1728isdn_open(struct inode *ino, struct file *filep)
1729{
1730        uint minor = iminor(ino);
1731        int drvidx;
1732        int chidx;
1733        int retval = -ENODEV;
1734
1735        lock_kernel();
1736        if (minor == ISDN_MINOR_STATUS) {
1737                infostruct *p;
1738
1739                if ((p = kmalloc(sizeof(infostruct), GFP_KERNEL))) {
1740                        p->next = (char *) dev->infochain;
1741                        p->private = (char *) &(filep->private_data);
1742                        dev->infochain = p;
1743                        /* At opening we allow a single update */
1744                        filep->private_data = (char *) 1;
1745                        retval = 0;
1746                        goto out;
1747                } else {
1748                        retval = -ENOMEM;
1749                        goto out;
1750                }
Show full sources