diff options
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb/dvb-usb/opera1.c | 2 | ||||
-rw-r--r-- | drivers/media/video/Kconfig | 4 | ||||
-rw-r--r-- | drivers/media/video/bt8xx/bttv-driver.c | 1 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-cards.c | 5 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-video.c | 2 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx-core.c | 2 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-driver.c | 7 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-firmware.c | 8 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-cards.c | 41 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-core.c | 5 | ||||
-rw-r--r-- | drivers/media/video/tvp5150.c | 4 | ||||
-rw-r--r-- | drivers/media/video/usbvideo/usbvideo.c | 9 | ||||
-rw-r--r-- | drivers/media/video/v4l1-compat.c | 50 |
13 files changed, 90 insertions, 50 deletions
diff --git a/drivers/media/dvb/dvb-usb/opera1.c b/drivers/media/dvb/dvb-usb/opera1.c index 21935bf7059e..302cc67407c3 100644 --- a/drivers/media/dvb/dvb-usb/opera1.c +++ b/drivers/media/dvb/dvb-usb/opera1.c | |||
@@ -478,9 +478,9 @@ static int opera1_xilinx_load_firmware(struct usb_device *dev, | |||
478 | err("could not restart the USB controller CPU."); | 478 | err("could not restart the USB controller CPU."); |
479 | ret = -EINVAL; | 479 | ret = -EINVAL; |
480 | } | 480 | } |
481 | kfree(p); | ||
482 | } | 481 | } |
483 | } | 482 | } |
483 | kfree(p); | ||
484 | if (fw) { | 484 | if (fw) { |
485 | release_firmware(fw); | 485 | release_firmware(fw); |
486 | } | 486 | } |
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index 37072a21d8c9..1832966f53f3 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig | |||
@@ -305,7 +305,7 @@ comment "MPEG video encoders" | |||
305 | 305 | ||
306 | config VIDEO_CX2341X | 306 | config VIDEO_CX2341X |
307 | tristate "Conexant CX2341x MPEG encoders" | 307 | tristate "Conexant CX2341x MPEG encoders" |
308 | depends on VIDEO_V4L2 && EXPERIMENTAL | 308 | depends on VIDEO_V4L2 && EXPERIMENTAL && VIDEO_V4L2_COMMON |
309 | ---help--- | 309 | ---help--- |
310 | Support for the Conexant CX23416 MPEG encoders | 310 | Support for the Conexant CX23416 MPEG encoders |
311 | and CX23415 MPEG encoder/decoders. | 311 | and CX23415 MPEG encoder/decoders. |
@@ -382,7 +382,7 @@ endmenu # encoder / decoder chips | |||
382 | 382 | ||
383 | config VIDEO_VIVI | 383 | config VIDEO_VIVI |
384 | tristate "Virtual Video Driver" | 384 | tristate "Virtual Video Driver" |
385 | depends on VIDEO_V4L2 && !SPARC32 && !SPARC64 | 385 | depends on VIDEO_DEV && VIDEO_V4L2 && !SPARC32 && !SPARC64 |
386 | select VIDEOBUF_VMALLOC | 386 | select VIDEOBUF_VMALLOC |
387 | default n | 387 | default n |
388 | ---help--- | 388 | ---help--- |
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c index 5404fcc5276d..a080c149cc6c 100644 --- a/drivers/media/video/bt8xx/bttv-driver.c +++ b/drivers/media/video/bt8xx/bttv-driver.c | |||
@@ -3389,7 +3389,6 @@ static struct video_device bttv_video_template = | |||
3389 | .vidiocgmbuf = vidiocgmbuf, | 3389 | .vidiocgmbuf = vidiocgmbuf, |
3390 | #endif | 3390 | #endif |
3391 | .vidioc_g_crop = bttv_g_crop, | 3391 | .vidioc_g_crop = bttv_g_crop, |
3392 | .vidioc_g_crop = bttv_g_crop, | ||
3393 | .vidioc_s_crop = bttv_s_crop, | 3392 | .vidioc_s_crop = bttv_s_crop, |
3394 | .vidioc_g_fbuf = bttv_g_fbuf, | 3393 | .vidioc_g_fbuf = bttv_g_fbuf, |
3395 | .vidioc_s_fbuf = bttv_s_fbuf, | 3394 | .vidioc_s_fbuf = bttv_s_fbuf, |
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c index e6b7f518c56e..8c9a8adf52de 100644 --- a/drivers/media/video/cx88/cx88-cards.c +++ b/drivers/media/video/cx88/cx88-cards.c | |||
@@ -2196,6 +2196,11 @@ struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr) | |||
2196 | cx88_reset(core); | 2196 | cx88_reset(core); |
2197 | cx88_card_setup_pre_i2c(core); | 2197 | cx88_card_setup_pre_i2c(core); |
2198 | cx88_i2c_init(core, pci); | 2198 | cx88_i2c_init(core, pci); |
2199 | |||
2200 | /* load tuner module, if needed */ | ||
2201 | if (TUNER_ABSENT != core->board.tuner_type) | ||
2202 | request_module("tuner"); | ||
2203 | |||
2199 | cx88_call_i2c_clients (core, TUNER_SET_STANDBY, NULL); | 2204 | cx88_call_i2c_clients (core, TUNER_SET_STANDBY, NULL); |
2200 | cx88_card_setup(core); | 2205 | cx88_card_setup(core); |
2201 | cx88_ir_init(core, pci); | 2206 | cx88_ir_init(core, pci); |
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c index 7f1931aed207..227179620d13 100644 --- a/drivers/media/video/cx88/cx88-video.c +++ b/drivers/media/video/cx88/cx88-video.c | |||
@@ -1826,8 +1826,6 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev, | |||
1826 | cx_set(MO_PCI_INTMSK, core->pci_irqmask); | 1826 | cx_set(MO_PCI_INTMSK, core->pci_irqmask); |
1827 | 1827 | ||
1828 | /* load and configure helper modules */ | 1828 | /* load and configure helper modules */ |
1829 | if (TUNER_ABSENT != core->board.tuner_type) | ||
1830 | request_module("tuner"); | ||
1831 | 1829 | ||
1832 | if (core->board.audio_chip == AUDIO_CHIP_WM8775) | 1830 | if (core->board.audio_chip == AUDIO_CHIP_WM8775) |
1833 | request_module("wm8775"); | 1831 | request_module("wm8775"); |
diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c index 7d1537cab867..c1caaa855b99 100644 --- a/drivers/media/video/em28xx/em28xx-core.c +++ b/drivers/media/video/em28xx/em28xx-core.c | |||
@@ -267,7 +267,7 @@ static int em28xx_write_ac97(struct em28xx *dev, u8 reg, u8 *val) | |||
267 | for (i = 0; i < 10; i++) { | 267 | for (i = 0; i < 10; i++) { |
268 | if ((ret = em28xx_read_reg(dev, AC97BUSY_REG)) < 0) | 268 | if ((ret = em28xx_read_reg(dev, AC97BUSY_REG)) < 0) |
269 | return ret; | 269 | return ret; |
270 | if (!((u8) ret) & 0x01) | 270 | if (!(ret & 0x01)) |
271 | return 0; | 271 | return 0; |
272 | msleep(5); | 272 | msleep(5); |
273 | } | 273 | } |
diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/video/ivtv/ivtv-driver.c index d42f120354e5..948ca35e7ee8 100644 --- a/drivers/media/video/ivtv/ivtv-driver.c +++ b/drivers/media/video/ivtv/ivtv-driver.c | |||
@@ -54,7 +54,6 @@ | |||
54 | #include "ivtv-vbi.h" | 54 | #include "ivtv-vbi.h" |
55 | #include "ivtv-routing.h" | 55 | #include "ivtv-routing.h" |
56 | #include "ivtv-gpio.h" | 56 | #include "ivtv-gpio.h" |
57 | #include "ivtv-yuv.h" | ||
58 | 57 | ||
59 | #include <media/tveeprom.h> | 58 | #include <media/tveeprom.h> |
60 | #include <media/saa7115.h> | 59 | #include <media/saa7115.h> |
@@ -700,6 +699,9 @@ static int __devinit ivtv_init_struct1(struct ivtv *itv) | |||
700 | itv->vbi.in.type = V4L2_BUF_TYPE_SLICED_VBI_CAPTURE; | 699 | itv->vbi.in.type = V4L2_BUF_TYPE_SLICED_VBI_CAPTURE; |
701 | itv->vbi.sliced_in = &itv->vbi.in.fmt.sliced; | 700 | itv->vbi.sliced_in = &itv->vbi.in.fmt.sliced; |
702 | 701 | ||
702 | /* Init the sg table for osd/yuv output */ | ||
703 | sg_init_table(itv->udma.SGlist, IVTV_DMA_SG_OSD_ENT); | ||
704 | |||
703 | /* OSD */ | 705 | /* OSD */ |
704 | itv->osd_global_alpha_state = 1; | 706 | itv->osd_global_alpha_state = 1; |
705 | itv->osd_global_alpha = 255; | 707 | itv->osd_global_alpha = 255; |
@@ -1053,9 +1055,6 @@ static int __devinit ivtv_probe(struct pci_dev *dev, | |||
1053 | goto free_io; | 1055 | goto free_io; |
1054 | } | 1056 | } |
1055 | 1057 | ||
1056 | /* Check yuv output filter table */ | ||
1057 | if (itv->has_cx23415) ivtv_yuv_filter_check(itv); | ||
1058 | |||
1059 | ivtv_gpio_init(itv); | 1058 | ivtv_gpio_init(itv); |
1060 | 1059 | ||
1061 | /* active i2c */ | 1060 | /* active i2c */ |
diff --git a/drivers/media/video/ivtv/ivtv-firmware.c b/drivers/media/video/ivtv/ivtv-firmware.c index 425eb1063904..6dba55b7e25a 100644 --- a/drivers/media/video/ivtv/ivtv-firmware.c +++ b/drivers/media/video/ivtv/ivtv-firmware.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include "ivtv-driver.h" | 22 | #include "ivtv-driver.h" |
23 | #include "ivtv-mailbox.h" | 23 | #include "ivtv-mailbox.h" |
24 | #include "ivtv-firmware.h" | 24 | #include "ivtv-firmware.h" |
25 | #include "ivtv-yuv.h" | ||
25 | #include <linux/firmware.h> | 26 | #include <linux/firmware.h> |
26 | 27 | ||
27 | #define IVTV_MASK_SPU_ENABLE 0xFFFFFFFE | 28 | #define IVTV_MASK_SPU_ENABLE 0xFFFFFFFE |
@@ -225,11 +226,14 @@ int ivtv_firmware_init(struct ivtv *itv) | |||
225 | return 0; | 226 | return 0; |
226 | 227 | ||
227 | itv->dec_mbox.mbox = ivtv_search_mailbox(itv->dec_mem, IVTV_DECODER_SIZE); | 228 | itv->dec_mbox.mbox = ivtv_search_mailbox(itv->dec_mem, IVTV_DECODER_SIZE); |
228 | if (itv->dec_mbox.mbox == NULL) | 229 | if (itv->dec_mbox.mbox == NULL) { |
229 | IVTV_ERR("Decoder mailbox not found\n"); | 230 | IVTV_ERR("Decoder mailbox not found\n"); |
230 | else if (itv->has_cx23415 && ivtv_vapi(itv, CX2341X_DEC_PING_FW, 0)) { | 231 | } else if (itv->has_cx23415 && ivtv_vapi(itv, CX2341X_DEC_PING_FW, 0)) { |
231 | IVTV_ERR("Decoder firmware dead!\n"); | 232 | IVTV_ERR("Decoder firmware dead!\n"); |
232 | itv->dec_mbox.mbox = NULL; | 233 | itv->dec_mbox.mbox = NULL; |
234 | } else { | ||
235 | /* Firmware okay, so check yuv output filter table */ | ||
236 | ivtv_yuv_filter_check(itv); | ||
233 | } | 237 | } |
234 | return itv->dec_mbox.mbox ? 0 : -ENODEV; | 238 | return itv->dec_mbox.mbox ? 0 : -ENODEV; |
235 | } | 239 | } |
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c index 262830da08c8..6f5744286e8c 100644 --- a/drivers/media/video/saa7134/saa7134-cards.c +++ b/drivers/media/video/saa7134/saa7134-cards.c | |||
@@ -2484,27 +2484,28 @@ struct saa7134_board saa7134_boards[] = { | |||
2484 | .tuner_addr = ADDR_UNSET, | 2484 | .tuner_addr = ADDR_UNSET, |
2485 | .radio_addr = ADDR_UNSET, | 2485 | .radio_addr = ADDR_UNSET, |
2486 | .gpiomask = 0x080200000, | 2486 | .gpiomask = 0x080200000, |
2487 | .inputs = {{ | 2487 | .inputs = { { |
2488 | .name = name_tv, | 2488 | .name = name_tv, |
2489 | .vmux = 4, | 2489 | .vmux = 4, |
2490 | .amux = TV, | 2490 | .amux = TV, |
2491 | .tv = 1, | 2491 | .tv = 1, |
2492 | },{ | 2492 | }, { |
2493 | .name = name_comp1, | 2493 | .name = name_comp1, |
2494 | .vmux = 1, | 2494 | .vmux = 1, |
2495 | .amux = LINE2, | 2495 | .amux = LINE2, |
2496 | },{ | 2496 | }, { |
2497 | .name = name_comp2, | 2497 | .name = name_comp2, |
2498 | .vmux = 0, | 2498 | .vmux = 0, |
2499 | .amux = LINE2, | 2499 | .amux = LINE2, |
2500 | },{ | 2500 | }, { |
2501 | .name = name_svideo, | 2501 | .name = name_svideo, |
2502 | .vmux = 8, | 2502 | .vmux = 8, |
2503 | .amux = LINE2, | 2503 | .amux = LINE2, |
2504 | }}, | 2504 | } }, |
2505 | .radio = { | 2505 | .radio = { |
2506 | .name = name_radio, | 2506 | .name = name_radio, |
2507 | .amux = LINE1, | 2507 | .amux = TV, |
2508 | .gpio = 0x0200000, | ||
2508 | }, | 2509 | }, |
2509 | }, | 2510 | }, |
2510 | [SAA7134_BOARD_ASUSTeK_P7131_DUAL] = { | 2511 | [SAA7134_BOARD_ASUSTeK_P7131_DUAL] = { |
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c index 52baa4f7f7dd..58ab163fdbd7 100644 --- a/drivers/media/video/saa7134/saa7134-core.c +++ b/drivers/media/video/saa7134/saa7134-core.c | |||
@@ -1022,12 +1022,13 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev, | |||
1022 | saa7134_i2c_register(dev); | 1022 | saa7134_i2c_register(dev); |
1023 | 1023 | ||
1024 | /* initialize hardware #2 */ | 1024 | /* initialize hardware #2 */ |
1025 | if (TUNER_ABSENT != dev->tuner_type) | ||
1026 | request_module("tuner"); | ||
1025 | saa7134_board_init2(dev); | 1027 | saa7134_board_init2(dev); |
1028 | |||
1026 | saa7134_hwinit2(dev); | 1029 | saa7134_hwinit2(dev); |
1027 | 1030 | ||
1028 | /* load i2c helpers */ | 1031 | /* load i2c helpers */ |
1029 | if (TUNER_ABSENT != dev->tuner_type) | ||
1030 | request_module("tuner"); | ||
1031 | if (card_is_empress(dev)) { | 1032 | if (card_is_empress(dev)) { |
1032 | request_module("saa6752hs"); | 1033 | request_module("saa6752hs"); |
1033 | } | 1034 | } |
diff --git a/drivers/media/video/tvp5150.c b/drivers/media/video/tvp5150.c index 445eba4174d7..d28318cb2b8d 100644 --- a/drivers/media/video/tvp5150.c +++ b/drivers/media/video/tvp5150.c | |||
@@ -672,7 +672,7 @@ static int tvp5150_set_vbi(struct i2c_client *c, | |||
672 | if (std == V4L2_STD_ALL) { | 672 | if (std == V4L2_STD_ALL) { |
673 | tvp5150_err("VBI can't be configured without knowing number of lines\n"); | 673 | tvp5150_err("VBI can't be configured without knowing number of lines\n"); |
674 | return 0; | 674 | return 0; |
675 | } else if (std && V4L2_STD_625_50) { | 675 | } else if (std & V4L2_STD_625_50) { |
676 | /* Don't follow NTSC Line number convension */ | 676 | /* Don't follow NTSC Line number convension */ |
677 | line += 3; | 677 | line += 3; |
678 | } | 678 | } |
@@ -719,7 +719,7 @@ static int tvp5150_get_vbi(struct i2c_client *c, | |||
719 | if (std == V4L2_STD_ALL) { | 719 | if (std == V4L2_STD_ALL) { |
720 | tvp5150_err("VBI can't be configured without knowing number of lines\n"); | 720 | tvp5150_err("VBI can't be configured without knowing number of lines\n"); |
721 | return 0; | 721 | return 0; |
722 | } else if (std && V4L2_STD_625_50) { | 722 | } else if (std & V4L2_STD_625_50) { |
723 | /* Don't follow NTSC Line number convension */ | 723 | /* Don't follow NTSC Line number convension */ |
724 | line += 3; | 724 | line += 3; |
725 | } | 725 | } |
diff --git a/drivers/media/video/usbvideo/usbvideo.c b/drivers/media/video/usbvideo/usbvideo.c index fb434b5602a3..5d363be7bc73 100644 --- a/drivers/media/video/usbvideo/usbvideo.c +++ b/drivers/media/video/usbvideo/usbvideo.c | |||
@@ -1034,6 +1034,11 @@ int usbvideo_RegisterVideoDevice(struct uvd *uvd) | |||
1034 | info("%s: iface=%d. endpoint=$%02x paletteBits=$%08lx", | 1034 | info("%s: iface=%d. endpoint=$%02x paletteBits=$%08lx", |
1035 | __FUNCTION__, uvd->iface, uvd->video_endp, uvd->paletteBits); | 1035 | __FUNCTION__, uvd->iface, uvd->video_endp, uvd->paletteBits); |
1036 | } | 1036 | } |
1037 | if (uvd->dev == NULL) { | ||
1038 | err("%s: uvd->dev == NULL", __FUNCTION__); | ||
1039 | return -EINVAL; | ||
1040 | } | ||
1041 | uvd->vdev.dev=&(uvd->dev->dev); | ||
1037 | if (video_register_device(&uvd->vdev, VFL_TYPE_GRABBER, video_nr) == -1) { | 1042 | if (video_register_device(&uvd->vdev, VFL_TYPE_GRABBER, video_nr) == -1) { |
1038 | err("%s: video_register_device failed", __FUNCTION__); | 1043 | err("%s: video_register_device failed", __FUNCTION__); |
1039 | return -EPIPE; | 1044 | return -EPIPE; |
@@ -1041,10 +1046,6 @@ int usbvideo_RegisterVideoDevice(struct uvd *uvd) | |||
1041 | if (uvd->debug > 1) { | 1046 | if (uvd->debug > 1) { |
1042 | info("%s: video_register_device() successful", __FUNCTION__); | 1047 | info("%s: video_register_device() successful", __FUNCTION__); |
1043 | } | 1048 | } |
1044 | if (uvd->dev == NULL) { | ||
1045 | err("%s: uvd->dev == NULL", __FUNCTION__); | ||
1046 | return -EINVAL; | ||
1047 | } | ||
1048 | 1049 | ||
1049 | info("%s on /dev/video%d: canvas=%s videosize=%s", | 1050 | info("%s on /dev/video%d: canvas=%s videosize=%s", |
1050 | (uvd->handle != NULL) ? uvd->handle->drvName : "???", | 1051 | (uvd->handle != NULL) ? uvd->handle->drvName : "???", |
diff --git a/drivers/media/video/v4l1-compat.c b/drivers/media/video/v4l1-compat.c index dcf22a3b672a..50e1ff9f2be5 100644 --- a/drivers/media/video/v4l1-compat.c +++ b/drivers/media/video/v4l1-compat.c | |||
@@ -303,7 +303,11 @@ v4l_compat_translate_ioctl(struct inode *inode, | |||
303 | { | 303 | { |
304 | struct video_capability *cap = arg; | 304 | struct video_capability *cap = arg; |
305 | 305 | ||
306 | cap2 = kzalloc(sizeof(*cap2),GFP_KERNEL); | 306 | cap2 = kzalloc(sizeof(*cap2), GFP_KERNEL); |
307 | if (!cap2) { | ||
308 | err = -ENOMEM; | ||
309 | break; | ||
310 | } | ||
307 | memset(cap, 0, sizeof(*cap)); | 311 | memset(cap, 0, sizeof(*cap)); |
308 | memset(&fbuf2, 0, sizeof(fbuf2)); | 312 | memset(&fbuf2, 0, sizeof(fbuf2)); |
309 | 313 | ||
@@ -426,7 +430,11 @@ v4l_compat_translate_ioctl(struct inode *inode, | |||
426 | { | 430 | { |
427 | struct video_window *win = arg; | 431 | struct video_window *win = arg; |
428 | 432 | ||
429 | fmt2 = kzalloc(sizeof(*fmt2),GFP_KERNEL); | 433 | fmt2 = kzalloc(sizeof(*fmt2), GFP_KERNEL); |
434 | if (!fmt2) { | ||
435 | err = -ENOMEM; | ||
436 | break; | ||
437 | } | ||
430 | memset(win,0,sizeof(*win)); | 438 | memset(win,0,sizeof(*win)); |
431 | 439 | ||
432 | fmt2->type = V4L2_BUF_TYPE_VIDEO_OVERLAY; | 440 | fmt2->type = V4L2_BUF_TYPE_VIDEO_OVERLAY; |
@@ -464,7 +472,11 @@ v4l_compat_translate_ioctl(struct inode *inode, | |||
464 | struct video_window *win = arg; | 472 | struct video_window *win = arg; |
465 | int err1,err2; | 473 | int err1,err2; |
466 | 474 | ||
467 | fmt2 = kzalloc(sizeof(*fmt2),GFP_KERNEL); | 475 | fmt2 = kzalloc(sizeof(*fmt2), GFP_KERNEL); |
476 | if (!fmt2) { | ||
477 | err = -ENOMEM; | ||
478 | break; | ||
479 | } | ||
468 | fmt2->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; | 480 | fmt2->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; |
469 | drv(inode, file, VIDIOC_STREAMOFF, &fmt2->type); | 481 | drv(inode, file, VIDIOC_STREAMOFF, &fmt2->type); |
470 | err1 = drv(inode, file, VIDIOC_G_FMT, fmt2); | 482 | err1 = drv(inode, file, VIDIOC_G_FMT, fmt2); |
@@ -586,6 +598,12 @@ v4l_compat_translate_ioctl(struct inode *inode, | |||
586 | { | 598 | { |
587 | struct video_picture *pict = arg; | 599 | struct video_picture *pict = arg; |
588 | 600 | ||
601 | fmt2 = kzalloc(sizeof(*fmt2), GFP_KERNEL); | ||
602 | if (!fmt2) { | ||
603 | err = -ENOMEM; | ||
604 | break; | ||
605 | } | ||
606 | |||
589 | pict->brightness = get_v4l_control(inode, file, | 607 | pict->brightness = get_v4l_control(inode, file, |
590 | V4L2_CID_BRIGHTNESS,drv); | 608 | V4L2_CID_BRIGHTNESS,drv); |
591 | pict->hue = get_v4l_control(inode, file, | 609 | pict->hue = get_v4l_control(inode, file, |
@@ -597,7 +615,6 @@ v4l_compat_translate_ioctl(struct inode *inode, | |||
597 | pict->whiteness = get_v4l_control(inode, file, | 615 | pict->whiteness = get_v4l_control(inode, file, |
598 | V4L2_CID_WHITENESS, drv); | 616 | V4L2_CID_WHITENESS, drv); |
599 | 617 | ||
600 | fmt2 = kzalloc(sizeof(*fmt2),GFP_KERNEL); | ||
601 | fmt2->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; | 618 | fmt2->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; |
602 | err = drv(inode, file, VIDIOC_G_FMT, fmt2); | 619 | err = drv(inode, file, VIDIOC_G_FMT, fmt2); |
603 | if (err < 0) { | 620 | if (err < 0) { |
@@ -617,6 +634,11 @@ v4l_compat_translate_ioctl(struct inode *inode, | |||
617 | struct video_picture *pict = arg; | 634 | struct video_picture *pict = arg; |
618 | int mem_err = 0, ovl_err = 0; | 635 | int mem_err = 0, ovl_err = 0; |
619 | 636 | ||
637 | fmt2 = kzalloc(sizeof(*fmt2), GFP_KERNEL); | ||
638 | if (!fmt2) { | ||
639 | err = -ENOMEM; | ||
640 | break; | ||
641 | } | ||
620 | memset(&fbuf2, 0, sizeof(fbuf2)); | 642 | memset(&fbuf2, 0, sizeof(fbuf2)); |
621 | 643 | ||
622 | set_v4l_control(inode, file, | 644 | set_v4l_control(inode, file, |
@@ -636,7 +658,6 @@ v4l_compat_translate_ioctl(struct inode *inode, | |||
636 | * different pixel formats for memory vs overlay. | 658 | * different pixel formats for memory vs overlay. |
637 | */ | 659 | */ |
638 | 660 | ||
639 | fmt2 = kzalloc(sizeof(*fmt2),GFP_KERNEL); | ||
640 | fmt2->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; | 661 | fmt2->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; |
641 | err = drv(inode, file, VIDIOC_G_FMT, fmt2); | 662 | err = drv(inode, file, VIDIOC_G_FMT, fmt2); |
642 | /* If VIDIOC_G_FMT failed, then the driver likely doesn't | 663 | /* If VIDIOC_G_FMT failed, then the driver likely doesn't |
@@ -890,7 +911,11 @@ v4l_compat_translate_ioctl(struct inode *inode, | |||
890 | { | 911 | { |
891 | struct video_mmap *mm = arg; | 912 | struct video_mmap *mm = arg; |
892 | 913 | ||
893 | fmt2 = kzalloc(sizeof(*fmt2),GFP_KERNEL); | 914 | fmt2 = kzalloc(sizeof(*fmt2), GFP_KERNEL); |
915 | if (!fmt2) { | ||
916 | err = -ENOMEM; | ||
917 | break; | ||
918 | } | ||
894 | memset(&buf2,0,sizeof(buf2)); | 919 | memset(&buf2,0,sizeof(buf2)); |
895 | 920 | ||
896 | fmt2->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; | 921 | fmt2->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; |
@@ -986,7 +1011,11 @@ v4l_compat_translate_ioctl(struct inode *inode, | |||
986 | { | 1011 | { |
987 | struct vbi_format *fmt = arg; | 1012 | struct vbi_format *fmt = arg; |
988 | 1013 | ||
989 | fmt2 = kzalloc(sizeof(*fmt2),GFP_KERNEL); | 1014 | fmt2 = kzalloc(sizeof(*fmt2), GFP_KERNEL); |
1015 | if (!fmt2) { | ||
1016 | err = -ENOMEM; | ||
1017 | break; | ||
1018 | } | ||
990 | fmt2->type = V4L2_BUF_TYPE_VBI_CAPTURE; | 1019 | fmt2->type = V4L2_BUF_TYPE_VBI_CAPTURE; |
991 | 1020 | ||
992 | err = drv(inode, file, VIDIOC_G_FMT, fmt2); | 1021 | err = drv(inode, file, VIDIOC_G_FMT, fmt2); |
@@ -1018,8 +1047,11 @@ v4l_compat_translate_ioctl(struct inode *inode, | |||
1018 | break; | 1047 | break; |
1019 | } | 1048 | } |
1020 | 1049 | ||
1021 | fmt2 = kzalloc(sizeof(*fmt2),GFP_KERNEL); | 1050 | fmt2 = kzalloc(sizeof(*fmt2), GFP_KERNEL); |
1022 | 1051 | if (!fmt2) { | |
1052 | err = -ENOMEM; | ||
1053 | break; | ||
1054 | } | ||
1023 | fmt2->type = V4L2_BUF_TYPE_VBI_CAPTURE; | 1055 | fmt2->type = V4L2_BUF_TYPE_VBI_CAPTURE; |
1024 | fmt2->fmt.vbi.samples_per_line = fmt->samples_per_line; | 1056 | fmt2->fmt.vbi.samples_per_line = fmt->samples_per_line; |
1025 | fmt2->fmt.vbi.sampling_rate = fmt->sampling_rate; | 1057 | fmt2->fmt.vbi.sampling_rate = fmt->sampling_rate; |