|
@@ -305,9 +305,8 @@ v4l_compat_translate_ioctl(struct inode *inode,
|
|
{
|
|
{
|
|
struct video_capability *cap = arg;
|
|
struct video_capability *cap = arg;
|
|
|
|
|
|
- cap2 = kmalloc(sizeof(*cap2),GFP_KERNEL);
|
|
|
|
|
|
+ cap2 = kzalloc(sizeof(*cap2),GFP_KERNEL);
|
|
memset(cap, 0, sizeof(*cap));
|
|
memset(cap, 0, sizeof(*cap));
|
|
- memset(cap2, 0, sizeof(*cap2));
|
|
|
|
memset(&fbuf2, 0, sizeof(fbuf2));
|
|
memset(&fbuf2, 0, sizeof(fbuf2));
|
|
|
|
|
|
err = drv(inode, file, VIDIOC_QUERYCAP, cap2);
|
|
err = drv(inode, file, VIDIOC_QUERYCAP, cap2);
|
|
@@ -422,9 +421,8 @@ v4l_compat_translate_ioctl(struct inode *inode,
|
|
{
|
|
{
|
|
struct video_window *win = arg;
|
|
struct video_window *win = arg;
|
|
|
|
|
|
- fmt2 = kmalloc(sizeof(*fmt2),GFP_KERNEL);
|
|
|
|
|
|
+ fmt2 = kzalloc(sizeof(*fmt2),GFP_KERNEL);
|
|
memset(win,0,sizeof(*win));
|
|
memset(win,0,sizeof(*win));
|
|
- memset(fmt2,0,sizeof(*fmt2));
|
|
|
|
|
|
|
|
fmt2->type = V4L2_BUF_TYPE_VIDEO_OVERLAY;
|
|
fmt2->type = V4L2_BUF_TYPE_VIDEO_OVERLAY;
|
|
err = drv(inode, file, VIDIOC_G_FMT, fmt2);
|
|
err = drv(inode, file, VIDIOC_G_FMT, fmt2);
|
|
@@ -461,8 +459,7 @@ v4l_compat_translate_ioctl(struct inode *inode,
|
|
struct video_window *win = arg;
|
|
struct video_window *win = arg;
|
|
int err1,err2;
|
|
int err1,err2;
|
|
|
|
|
|
- fmt2 = kmalloc(sizeof(*fmt2),GFP_KERNEL);
|
|
|
|
- memset(fmt2,0,sizeof(*fmt2));
|
|
|
|
|
|
+ fmt2 = kzalloc(sizeof(*fmt2),GFP_KERNEL);
|
|
fmt2->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
|
fmt2->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
|
drv(inode, file, VIDIOC_STREAMOFF, &fmt2->type);
|
|
drv(inode, file, VIDIOC_STREAMOFF, &fmt2->type);
|
|
err1 = drv(inode, file, VIDIOC_G_FMT, fmt2);
|
|
err1 = drv(inode, file, VIDIOC_G_FMT, fmt2);
|
|
@@ -595,8 +592,7 @@ v4l_compat_translate_ioctl(struct inode *inode,
|
|
pict->whiteness = get_v4l_control(inode, file,
|
|
pict->whiteness = get_v4l_control(inode, file,
|
|
V4L2_CID_WHITENESS, drv);
|
|
V4L2_CID_WHITENESS, drv);
|
|
|
|
|
|
- fmt2 = kmalloc(sizeof(*fmt2),GFP_KERNEL);
|
|
|
|
- memset(fmt2,0,sizeof(*fmt2));
|
|
|
|
|
|
+ fmt2 = kzalloc(sizeof(*fmt2),GFP_KERNEL);
|
|
fmt2->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
|
fmt2->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
|
err = drv(inode, file, VIDIOC_G_FMT, fmt2);
|
|
err = drv(inode, file, VIDIOC_G_FMT, fmt2);
|
|
if (err < 0) {
|
|
if (err < 0) {
|
|
@@ -622,8 +618,7 @@ v4l_compat_translate_ioctl(struct inode *inode,
|
|
set_v4l_control(inode, file,
|
|
set_v4l_control(inode, file,
|
|
V4L2_CID_WHITENESS, pict->whiteness, drv);
|
|
V4L2_CID_WHITENESS, pict->whiteness, drv);
|
|
|
|
|
|
- fmt2 = kmalloc(sizeof(*fmt2),GFP_KERNEL);
|
|
|
|
- memset(fmt2,0,sizeof(*fmt2));
|
|
|
|
|
|
+ fmt2 = kzalloc(sizeof(*fmt2),GFP_KERNEL);
|
|
fmt2->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
|
fmt2->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
|
err = drv(inode, file, VIDIOC_G_FMT, fmt2);
|
|
err = drv(inode, file, VIDIOC_G_FMT, fmt2);
|
|
if (err < 0)
|
|
if (err < 0)
|
|
@@ -846,9 +841,8 @@ v4l_compat_translate_ioctl(struct inode *inode,
|
|
{
|
|
{
|
|
struct video_mmap *mm = arg;
|
|
struct video_mmap *mm = arg;
|
|
|
|
|
|
- fmt2 = kmalloc(sizeof(*fmt2),GFP_KERNEL);
|
|
|
|
|
|
+ fmt2 = kzalloc(sizeof(*fmt2),GFP_KERNEL);
|
|
memset(&buf2,0,sizeof(buf2));
|
|
memset(&buf2,0,sizeof(buf2));
|
|
- memset(fmt2,0,sizeof(*fmt2));
|
|
|
|
|
|
|
|
fmt2->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
|
fmt2->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
|
err = drv(inode, file, VIDIOC_G_FMT, fmt2);
|
|
err = drv(inode, file, VIDIOC_G_FMT, fmt2);
|
|
@@ -942,8 +936,7 @@ v4l_compat_translate_ioctl(struct inode *inode,
|
|
{
|
|
{
|
|
struct vbi_format *fmt = arg;
|
|
struct vbi_format *fmt = arg;
|
|
|
|
|
|
- fmt2 = kmalloc(sizeof(*fmt2),GFP_KERNEL);
|
|
|
|
- memset(fmt2, 0, sizeof(*fmt2));
|
|
|
|
|
|
+ fmt2 = kzalloc(sizeof(*fmt2),GFP_KERNEL);
|
|
fmt2->type = V4L2_BUF_TYPE_VBI_CAPTURE;
|
|
fmt2->type = V4L2_BUF_TYPE_VBI_CAPTURE;
|
|
|
|
|
|
err = drv(inode, file, VIDIOC_G_FMT, fmt2);
|
|
err = drv(inode, file, VIDIOC_G_FMT, fmt2);
|
|
@@ -975,8 +968,7 @@ v4l_compat_translate_ioctl(struct inode *inode,
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
- fmt2 = kmalloc(sizeof(*fmt2),GFP_KERNEL);
|
|
|
|
- memset(fmt2, 0, sizeof(*fmt2));
|
|
|
|
|
|
+ fmt2 = kzalloc(sizeof(*fmt2),GFP_KERNEL);
|
|
|
|
|
|
fmt2->type = V4L2_BUF_TYPE_VBI_CAPTURE;
|
|
fmt2->type = V4L2_BUF_TYPE_VBI_CAPTURE;
|
|
fmt2->fmt.vbi.samples_per_line = fmt->samples_per_line;
|
|
fmt2->fmt.vbi.samples_per_line = fmt->samples_per_line;
|