Skip to content

Commit

Permalink
V4L/DVB (8682): V4L: fix return value of register video func
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Henrik Kretzschmar authored and Mauro Carvalho Chehab committed Sep 3, 2008
1 parent b045979 commit 46f2c21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/v4l2-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 46f2c21

Please sign in to comment.