diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-10-09 16:31:58 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-10-09 16:31:58 -0400 |
commit | 9e165acf1b9e37af7c0fa39399b43d0bd8600039 (patch) | |
tree | 7ffdb0ad4c35ac9c19c4096b4f22ccc9b1eeefad /drivers/media/video/v4l2-dev.c | |
parent | 6a4690c22f5da1eb1c898b61b6a80da52fbd976f (diff) | |
parent | 791ccf2e4deeea8426b389fd0f5bb0e9167bb75d (diff) |
Merge branch 'at91' into devel
Diffstat (limited to 'drivers/media/video/v4l2-dev.c')
-rw-r--r-- | drivers/media/video/v4l2-dev.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c index 6f36006aecda..155fdec9ac7d 100644 --- a/drivers/media/video/v4l2-dev.c +++ b/drivers/media/video/v4l2-dev.c | |||
@@ -257,6 +257,9 @@ int video_register_device_index(struct video_device *vfd, int type, int nr, | |||
257 | int ret; | 257 | int ret; |
258 | char *name_base; | 258 | char *name_base; |
259 | 259 | ||
260 | if (vfd == NULL) | ||
261 | return -EINVAL; | ||
262 | |||
260 | switch (type) { | 263 | switch (type) { |
261 | case VFL_TYPE_GRABBER: | 264 | case VFL_TYPE_GRABBER: |
262 | base = MINOR_VFL_TYPE_GRABBER_MIN; | 265 | base = MINOR_VFL_TYPE_GRABBER_MIN; |
@@ -281,7 +284,7 @@ int video_register_device_index(struct video_device *vfd, int type, int nr, | |||
281 | default: | 284 | default: |
282 | printk(KERN_ERR "%s called with unknown type: %d\n", | 285 | printk(KERN_ERR "%s called with unknown type: %d\n", |
283 | __func__, type); | 286 | __func__, type); |
284 | return -1; | 287 | return -EINVAL; |
285 | } | 288 | } |
286 | 289 | ||
287 | /* pick a minor number */ | 290 | /* pick a minor number */ |