]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
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 4145314a515b9554469ccde9ee0d6d968a7142b2..9795457723d86cfbed9563c9d0c454575010cd11 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;
        }