usb: misc: appledisplay: don't print on ENOMEM
authorWolfram Sang <wsa-dev@sang-engineering.com>
Thu, 25 Aug 2016 17:39:12 +0000 (19:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Aug 2016 17:17:37 +0000 (19:17 +0200)
All kmalloc-based functions print enough information on failures.

Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/misc/appledisplay.c

index 29569ec..da5ff40 100644 (file)
@@ -238,7 +238,6 @@ static int appledisplay_probe(struct usb_interface *iface,
        pdata = kzalloc(sizeof(struct appledisplay), GFP_KERNEL);
        if (!pdata) {
                retval = -ENOMEM;
        pdata = kzalloc(sizeof(struct appledisplay), GFP_KERNEL);
        if (!pdata) {
                retval = -ENOMEM;
-               dev_err(&iface->dev, "Out of memory\n");
                goto error;
        }
 
                goto error;
        }
 
@@ -252,8 +251,6 @@ static int appledisplay_probe(struct usb_interface *iface,
        pdata->msgdata = kmalloc(ACD_MSG_BUFFER_LEN, GFP_KERNEL);
        if (!pdata->msgdata) {
                retval = -ENOMEM;
        pdata->msgdata = kmalloc(ACD_MSG_BUFFER_LEN, GFP_KERNEL);
        if (!pdata->msgdata) {
                retval = -ENOMEM;
-               dev_err(&iface->dev,
-                       "Allocating buffer for control messages failed\n");
                goto error;
        }
 
                goto error;
        }