Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] staging: media: Remove unnecessary OOM messages

alloc failures already get standardized OOM
messages and a dump_stack.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Joe Perches and committed by
Mauro Carvalho Chehab
535ec049 d899eddd

+10 -32
+1 -3
drivers/staging/media/as102/as102_usb_drv.c
··· 374 374 } 375 375 376 376 as102_dev = kzalloc(sizeof(struct as102_dev_t), GFP_KERNEL); 377 - if (as102_dev == NULL) { 378 - dev_err(&intf->dev, "%s: kzalloc failed\n", __func__); 377 + if (as102_dev == NULL) 379 378 return -ENOMEM; 380 - } 381 379 382 380 /* Assign the user-friendly device name */ 383 381 for (i = 0; i < ARRAY_SIZE(as102_usb_id_table); i++) {
+7 -17
drivers/staging/media/go7007/go7007-fw.c
··· 381 381 int size = 0, i, off = 0, chunk; 382 382 383 383 buf = kzalloc(4096, GFP_KERNEL); 384 - if (buf == NULL) { 385 - dev_err(go->dev, 386 - "unable to allocate 4096 bytes for firmware construction\n"); 384 + if (buf == NULL) 387 385 return -1; 388 - } 389 386 390 387 for (i = 1; i < 32; ++i) { 391 388 mjpeg_frame_header(go, buf + size, i); ··· 648 651 int i, off = 0, chunk; 649 652 650 653 buf = kzalloc(5120, GFP_KERNEL); 651 - if (buf == NULL) { 652 - dev_err(go->dev, 653 - "unable to allocate 5120 bytes for firmware construction\n"); 654 + if (buf == NULL) 654 655 return -1; 655 - } 656 + 656 657 framelen[0] = mpeg1_frame_header(go, buf, 0, 1, PFRAME); 657 658 if (go->interlace_coding) 658 659 framelen[0] += mpeg1_frame_header(go, buf + framelen[0] / 8, ··· 833 838 int i, off = 0, chunk; 834 839 835 840 buf = kzalloc(5120, GFP_KERNEL); 836 - if (buf == NULL) { 837 - dev_err(go->dev, 838 - "unable to allocate 5120 bytes for firmware construction\n"); 841 + if (buf == NULL) 839 842 return -1; 840 - } 843 + 841 844 framelen[0] = mpeg4_frame_header(go, buf, 0, PFRAME); 842 845 i = 368; 843 846 framelen[1] = mpeg4_frame_header(go, buf + i, 0, BFRAME_PRE); ··· 1575 1582 return -1; 1576 1583 } 1577 1584 code = kzalloc(codespace * 2, GFP_KERNEL); 1578 - if (code == NULL) { 1579 - dev_err(go->dev, 1580 - "unable to allocate %d bytes for firmware construction\n", 1581 - codespace * 2); 1585 + if (code == NULL) 1582 1586 goto fw_failed; 1583 - } 1587 + 1584 1588 src = (__le16 *)fw_entry->data; 1585 1589 srclen = fw_entry->size / 2; 1586 1590 while (srclen >= 2) {
+2 -3
drivers/staging/media/go7007/s2250-loader.c
··· 81 81 82 82 /* Allocate dev data structure */ 83 83 s = kmalloc(sizeof(device_extension_t), GFP_KERNEL); 84 - if (s == NULL) { 85 - dev_err(&interface->dev, "Out of memory\n"); 84 + if (s == NULL) 86 85 goto failed; 87 - } 86 + 88 87 s2250_dev_table[minor] = s; 89 88 90 89 dev_info(&interface->dev,
-3
drivers/staging/media/lirc/lirc_imon.c
··· 744 744 745 745 context = kzalloc(sizeof(struct imon_context), GFP_KERNEL); 746 746 if (!context) { 747 - dev_err(dev, "%s: kzalloc failed for context\n", __func__); 748 747 alloc_status = 1; 749 748 goto alloc_status_switch; 750 749 } ··· 825 826 826 827 driver = kzalloc(sizeof(struct lirc_driver), GFP_KERNEL); 827 828 if (!driver) { 828 - dev_err(dev, "%s: kzalloc failed for lirc_driver\n", __func__); 829 829 alloc_status = 2; 830 830 goto alloc_status_switch; 831 831 } 832 832 rbuf = kmalloc(sizeof(struct lirc_buffer), GFP_KERNEL); 833 833 if (!rbuf) { 834 - dev_err(dev, "%s: kmalloc failed for lirc_buffer\n", __func__); 835 834 alloc_status = 3; 836 835 goto alloc_status_switch; 837 836 }
-6
drivers/staging/media/lirc/lirc_sasem.c
··· 759 759 760 760 context = kzalloc(sizeof(struct sasem_context), GFP_KERNEL); 761 761 if (!context) { 762 - dev_err(&interface->dev, 763 - "%s: kzalloc failed for context\n", __func__); 764 762 alloc_status = 1; 765 763 goto alloc_status_switch; 766 764 } 767 765 driver = kzalloc(sizeof(struct lirc_driver), GFP_KERNEL); 768 766 if (!driver) { 769 - dev_err(&interface->dev, 770 - "%s: kzalloc failed for lirc_driver\n", __func__); 771 767 alloc_status = 2; 772 768 goto alloc_status_switch; 773 769 } 774 770 rbuf = kmalloc(sizeof(struct lirc_buffer), GFP_KERNEL); 775 771 if (!rbuf) { 776 - dev_err(&interface->dev, 777 - "%s: kmalloc failed for lirc_buffer\n", __func__); 778 772 alloc_status = 3; 779 773 goto alloc_status_switch; 780 774 }