]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
staging: rtl8712: return -ENOMEM instead of -1
authorVitaly Osipov <vitaly.osipov@gmail.com>
Tue, 27 May 2014 12:27:37 +0000 (22:27 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 May 2014 18:55:29 +0000 (11:55 -0700)
After the commit 91d435f replaced _malloc with kmalloc, smatch picked up a
couple of new warnings. This fixes the warning:

warn: returning -1 instead of -ENOMEM is sloppy

Signed-off-by: Vitaly Osipov <vitaly.osipov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/usb_ops_linux.c

index 064dc1076d2a15378dc514a8f7119ed7d55d79f6..a6c2aab0a946096f2df0824ccfa679054d5fa50d 100644 (file)
@@ -499,7 +499,7 @@ int r8712_usbctrl_vendorreq(struct intf_priv *pintfpriv, u8 request, u16 value,
        if (palloc_buf == NULL) {
                dev_err(&udev->dev, "%s: Can't alloc memory for vendor request\n",
                        __func__);
-               return -1;
+               return -ENOMEM;
        }
        pIo_buf = palloc_buf + 16 - ((addr_t)(palloc_buf) & 0x0f);
        if (requesttype == 0x01) {