diff options
author | Dan Carpenter <error27@gmail.com> | 2010-11-01 23:22:23 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-12-29 05:16:39 -0500 |
commit | 0e72cc8b8d48ba05e705f432fb99aaa0ea6737c6 (patch) | |
tree | 466279b5e4095bc95e3df1558ab3484601ee6504 /drivers/media/video/saa7164/saa7164-core.c | |
parent | 76e4a9a7164263d8ffe816920f84a91e7dfee444 (diff) |
[media] saa7164: make buffer smaller
This isn't a runtime bug, it's just to make static checkers happy.
In vidioc_querycap() we copy a saa7164_dev ->name driver array into a
v4l2_capability -> driver array. The ->driver array is only 16 chars
long so ->name also can't be more than 16 characters.
The ->name gets set in v4l2_capability() and it always is less than 16
characters so we can easily make the buffer smaller.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7164/saa7164-core.c')
-rw-r--r-- | drivers/media/video/saa7164/saa7164-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/saa7164/saa7164-core.c b/drivers/media/video/saa7164/saa7164-core.c index e1bac5051460..b66f78f7042c 100644 --- a/drivers/media/video/saa7164/saa7164-core.c +++ b/drivers/media/video/saa7164/saa7164-core.c | |||
@@ -1001,7 +1001,7 @@ static int saa7164_dev_setup(struct saa7164_dev *dev) | |||
1001 | atomic_inc(&dev->refcount); | 1001 | atomic_inc(&dev->refcount); |
1002 | dev->nr = saa7164_devcount++; | 1002 | dev->nr = saa7164_devcount++; |
1003 | 1003 | ||
1004 | sprintf(dev->name, "saa7164[%d]", dev->nr); | 1004 | snprintf(dev->name, sizeof(dev->name), "saa7164[%d]", dev->nr); |
1005 | 1005 | ||
1006 | mutex_lock(&devlist); | 1006 | mutex_lock(&devlist); |
1007 | list_add_tail(&dev->devlist, &saa7164_devlist); | 1007 | list_add_tail(&dev->devlist, &saa7164_devlist); |