[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <48AF1E83.4000102@nachtwindheim.de>
Date: Fri, 22 Aug 2008 22:16:03 +0200
From: Henne <henne@...htwindheim.de>
To: mchehab@...radead.org
CC: video4linux-list@...hat.com, linux-kernel@...r.kernel.org
Subject: [PATCH] V4L: fix retval in vivi driver for more than one device
From: Henrik Kretzschmar <henne@...htwindheim.de>
Signed-off-by: Henrik Kretzschmar <henne@...htwindheim.de>
The variable ret should be set for each device to -ENOMEM, not only the first.
diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c
index 3518af0..d739b59 100644
--- a/drivers/media/video/vivi.c
+++ b/drivers/media/video/vivi.c
@@ -1106,11 +1106,12 @@ static struct video_device vivi_template = {
static int __init vivi_init(void)
{
- int ret = -ENOMEM, i;
+ int ret, i;
struct vivi_dev *dev;
struct video_device *vfd;
for (i = 0; i < n_devs; i++) {
+ ret = -ENOMEM;
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
if (NULL == dev)
break;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists