Showing error 1912

User: Jiri Slaby
Error type: Invalid Pointer Dereference
Error type description: A pointer which is invalid is being dereferenced
File location: drivers/media/video/cx23885/cx23885-417.c
Line in file: 1583
Project: Linux Kernel
Project version: 2.6.28
Tools: Cppcheck (1.59)
Entered: 2013-10-17 18:38:34 UTC


Source:

1553                "%s/2: =============  END LOG STATUS  =============\n",
1554               dev->name);
1555        return 0;
1556}
1557
1558static int vidioc_querymenu(struct file *file, void *priv,
1559                                struct v4l2_querymenu *a)
1560{
1561        struct cx23885_fh  *fh  = priv;
1562        struct cx23885_dev *dev = fh->dev;
1563
1564        return cx23885_querymenu(dev, a);
1565}
1566
1567static int vidioc_queryctrl(struct file *file, void *priv,
1568                                struct v4l2_queryctrl *c)
1569{
1570        struct cx23885_fh  *fh  = priv;
1571        struct cx23885_dev *dev = fh->dev;
1572
1573        return cx23885_queryctrl(dev, c);
1574}
1575
1576static int mpeg_open(struct inode *inode, struct file *file)
1577{
1578        int minor = iminor(inode);
1579        struct cx23885_dev *h, *dev = NULL;
1580        struct list_head *list;
1581        struct cx23885_fh *fh;
1582
1583        dprintk(2, "%s()\n", __func__);
1584
1585        lock_kernel();
1586        list_for_each(list, &cx23885_devlist) {
1587                h = list_entry(list, struct cx23885_dev, devlist);
1588                if (h->v4l_device->minor == minor) {
1589                        dev = h;
1590                        break;
1591                }
1592        }
1593
Show full sources