Subject: [PATCH] V4L: fix return value of register video func

From: Henrik Kretzschmar <[email protected]>
Signed-off-by: Henrik Kretzschmar <[email protected]>

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 */