usb: misc: trancevibrator: don't print on ENOMEM
authorWolfram Sang <wsa-dev@sang-engineering.com>
Thu, 25 Aug 2016 17:39:21 +0000 (19:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Aug 2016 17:17:38 +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/trancevibrator.c

index 4145314..9795457 100644 (file)
@@ -95,8 +95,7 @@ static int tv_probe(struct usb_interface *interface,
        int retval;
 
        dev = kzalloc(sizeof(struct trancevibrator), GFP_KERNEL);
-       if (dev == NULL) {
-               dev_err(&interface->dev, "Out of memory\n");
+       if (!dev) {
                retval = -ENOMEM;
                goto error;
        }