aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/v4l2-dev.c
diff options
context:
space:
mode:
authorHenrik Kretzschmar <henne@nachtwindheim.de>2008-09-03 15:47:39 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-09-03 17:36:42 -0400
commit46f2c21cfdb1a829a9a23e23562ffa66b007dc48 (patch)
tree68163eb5a3f74d2397bd30cf33a81355799a1ca4 /drivers/media/video/v4l2-dev.c
parentb045979d61b235cd9cc8347760fcfb44fc8ecbd6 (diff)
V4L/DVB (8682): V4L: fix return value of register video func
If a wrong device type is used with video_register_device_index() it should better return an error number, instead of a constant. Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/v4l2-dev.c')
-rw-r--r--drivers/media/video/v4l2-dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c
index 6f36006aecda..0320fb84119c 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,
281 default: 281 default:
282 printk(KERN_ERR "%s called with unknown type: %d\n", 282 printk(KERN_ERR "%s called with unknown type: %d\n",
283 __func__, type); 283 __func__, type);
284 return -1; 284 return -EINVAL;
285 } 285 }
286 286
287 /* pick a minor number */ 287 /* pick a minor number */