media: core: v4l2-ioctl: check if ioctl is known to avoid NULL name
[linux-block.git] / drivers / media / v4l2-core / v4l2-ioctl.c
index 4d90424cbfc4eb545a3e904a280e78a41b6cfe61..33076af4dfdbd4d6298085801cf23ebc353225ae 100644 (file)
@@ -2951,7 +2951,7 @@ void v4l_printk_ioctl(const char *prefix, unsigned int cmd)
                type = "v4l2_int";
                break;
        case 'V':
-               if (_IOC_NR(cmd) >= V4L2_IOCTLS) {
+               if (!v4l2_is_known_ioctl(cmd)) {
                        type = "v4l2";
                        break;
                }