* [PATCH] V4L: fix return value of register video func
@ 2008-08-09 6:54 Henne
0 siblings, 0 replies; only message in thread
From: Henne @ 2008-08-09 6:54 UTC (permalink / raw)
To: mchehab; +Cc: video4linux-list, linux-kernel
From: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
If a wrong device type is used with video_register_device_index() it should
better return an error number, instead of a constant.
diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c
index 6f36006..0320fb8 100644
--- a/drivers/media/video/v4l2-dev.c
+++ b/drivers/media/video/v4l2-dev.c
@@ -281,7 +281,7 @@ int video_register_device_index(struct video_device *vfd, int type, int nr,
default:
printk(KERN_ERR "%s called with unknown type: %d\n",
__func__, type);
- return -1;
+ return -EINVAL;
}
/* pick a minor number */
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-08-09 7:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-09 6:54 [PATCH] V4L: fix return value of register video func Henne
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox