summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/v4l2-dev.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-09-08 16:59:05 -0700
committerDavid S. Miller <davem@davemloft.net>2008-09-08 16:59:05 -0700
commit17dce5dfe38ae2fb359b61e855f5d8a3a8b7892b (patch)
tree88bb1fcf84f9ebfa4299c9a8dcd9e6330b358446 /drivers/media/video/v4l2-dev.c
parent712d6954e3998d0de2840d8130941e8042541246 (diff)
parent82a28c794f27aac17d7a3ebd7f14d731a11a5532 (diff)
downloadop-kernel-dev-17dce5dfe38ae2fb359b61e855f5d8a3a8b7892b.zip
op-kernel-dev-17dce5dfe38ae2fb359b61e855f5d8a3a8b7892b.tar.gz
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: net/mac80211/mlme.c
Diffstat (limited to 'drivers/media/video/v4l2-dev.c')
-rw-r--r--drivers/media/video/v4l2-dev.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c
index 6f36006..155fdec 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,
int ret;
char *name_base;
+ if (vfd == NULL)
+ return -EINVAL;
+
switch (type) {
case VFL_TYPE_GRABBER:
base = MINOR_VFL_TYPE_GRABBER_MIN;
@@ -281,7 +284,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 */
OpenPOWER on IntegriCloud