V4L/DVB (9638): drivers/media: use ARRAY_SIZE
[pandora-kernel.git] / drivers / media / video / gspca / gspca.c
index 78a2214..02d6a48 100644 (file)
@@ -736,7 +736,7 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void  *priv,
                        if (fmtdesc->index == index)
                                break;          /* new format */
                        index++;
-                       if (index >= sizeof fmt_tb / sizeof fmt_tb[0])
+                       if (index >= ARRAY_SIZE(fmt_tb))
                                return -EINVAL;
                }
        }