Skip to contentSkip to conversation

V4L: fix return value of meye probe callback

PATCH New Henne 1 participant 1 message Aug 22, 2008 Media (V4L/DVB)

lore
Share & tools
lore

Henne

author
#0 lore raw

PATCH 1/1 V4L: fix return value of meye probe callback

From: Henrik Kretzschmar <[email protected]>

The return vaule of the probe function should return -ENOMEM instead of -EBUSY if video_device_alloc() fails.

drivers/media/video/meye.c +0 -0
index 7c8ef6a..225714b 100644
@@ -1774,6 +1774,7 @@ 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) {
@@ -1781,7 +1782,6 @@ static int __devinit meye_probe(struct pci_dev *pcidev,
		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");