[media] media: Remove OOM message after input_allocate_device
authorJoe Perches <joe@perches.com>
Wed, 23 Oct 2013 19:14:51 +0000 (16:14 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 7 Jan 2014 10:01:42 +0000 (08:01 -0200)
Emitting an OOM message isn't necessary after input_allocate_device
as there's a generic OOM and a dump_stack already done.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/rc/imon.c
drivers/media/usb/em28xx/em28xx-input.c
drivers/media/usb/pwc/pwc-if.c

index f329485c6629b038ff2aee825edff86c82189328..822b9f47ca729aa6cd769fc262fa98a3fa3616ef 100644 (file)
@@ -1909,10 +1909,8 @@ static struct input_dev *imon_init_idev(struct imon_context *ictx)
        int ret, i;
 
        idev = input_allocate_device();
-       if (!idev) {
-               dev_err(ictx->dev, "input dev allocation failed\n");
+       if (!idev)
                goto out;
-       }
 
        snprintf(ictx->name_idev, sizeof(ictx->name_idev),
                 "iMON Panel, Knob and Mouse(%04x:%04x)",
@@ -1960,10 +1958,8 @@ static struct input_dev *imon_init_touch(struct imon_context *ictx)
        int ret;
 
        touch = input_allocate_device();
-       if (!touch) {
-               dev_err(ictx->dev, "touchscreen input dev allocation failed\n");
+       if (!touch)
                goto touch_alloc_failed;
-       }
 
        snprintf(ictx->name_touch, sizeof(ictx->name_touch),
                 "iMON USB Touchscreen (%04x:%04x)",
index 9a5dad96ff085785a3753bd38ec90a69aae4d1ad..61c061f3a47626e90df3ca46de2f61ce4bf241ab 100644 (file)
@@ -557,10 +557,8 @@ static int em28xx_register_snapshot_button(struct em28xx *dev)
 
        em28xx_info("Registering snapshot button...\n");
        input_dev = input_allocate_device();
-       if (!input_dev) {
-               em28xx_errdev("input_allocate_device failed\n");
+       if (!input_dev)
                return -ENOMEM;
-       }
 
        usb_make_path(dev->udev, dev->snapshot_button_path,
                      sizeof(dev->snapshot_button_path));
index 78c9bc8e7f561744364a6de94f4aeaae382dd077..abf365ab025da5a92d432c06b61bf223642b0a37 100644 (file)
@@ -1078,7 +1078,6 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
        /* register webcam snapshot button input device */
        pdev->button_dev = input_allocate_device();
        if (!pdev->button_dev) {
-               PWC_ERROR("Err, insufficient memory for webcam snapshot button device.");
                rc = -ENOMEM;
                goto err_video_unreg;
        }