public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Henne <henne@nachtwindheim.de>
To: mchehab@infradead.org
Cc: video4linux-list@redhat.com, linux-kernel@vger.kernel.org
Subject: [PATCH] V4L: fix return value of meye probe callback
Date: Fri, 22 Aug 2008 22:13:05 +0200	[thread overview]
Message-ID: <48AF1DD1.1080800@nachtwindheim.de> (raw)

From: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>

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

diff --git a/drivers/media/video/meye.c b/drivers/media/video/meye.c
index 7c8ef6a..225714b 100644
--- a/drivers/media/video/meye.c
+++ b/drivers/media/video/meye.c
@@ -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");



                 reply	other threads:[~2008-08-22 20:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48AF1DD1.1080800@nachtwindheim.de \
    --to=henne@nachtwindheim.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=video4linux-list@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox