|
@@ -1844,10 +1844,11 @@ static int coda_register_device(struct coda_dev *dev, int i)
|
|
|
{
|
|
|
struct video_device *vfd = &dev->vfd[i];
|
|
|
|
|
|
- if (i > ARRAY_SIZE(dev->vfd))
|
|
|
+ if (i >= dev->devtype->num_vdevs)
|
|
|
return -EINVAL;
|
|
|
|
|
|
- snprintf(vfd->name, sizeof(vfd->name), dev->devtype->vdevs[i]->name);
|
|
|
+ snprintf(vfd->name, sizeof(vfd->name), "%s",
|
|
|
+ dev->devtype->vdevs[i]->name);
|
|
|
vfd->fops = &coda_fops;
|
|
|
vfd->ioctl_ops = &coda_ioctl_ops;
|
|
|
vfd->release = video_device_release_empty,
|