Skip to content

Commit

Permalink
V4L/DVB (8748): V4L: fix return value of meye probe callback
Browse files Browse the repository at this point in the history
The return vaule of the probe function should return -ENOMEM instead
of -EBUSY if video_device_alloc() fails.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Henrik Kretzschmar authored and Mauro Carvalho Chehab committed Oct 12, 2008
1 parent eda9e4e commit ef0e3c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/meye.c
Original file line number Diff line number Diff line change
Expand Up @@ -1779,14 +1779,14 @@ static int __devinit meye_probe(struct pci_dev *pcidev,
goto outnotdev;
}

ret = -ENOMEM;
meye.mchip_dev = pcidev;
meye.video_dev = video_device_alloc();
if (!meye.video_dev) {
printk(KERN_ERR "meye: video_device_alloc() failed!\n");
goto outnotdev;
}

ret = -ENOMEM;
meye.grab_temp = vmalloc(MCHIP_NB_PAGES_MJPEG * PAGE_SIZE);
if (!meye.grab_temp) {
printk(KERN_ERR "meye: grab buffer allocation failed\n");
Expand Down

0 comments on commit ef0e3c2

Please sign in to comment.