Commit 735e33fa authored by Vitaly Osipov's avatar Vitaly Osipov Committed by Greg Kroah-Hartman

staging: rtl8712: return -ENOMEM instead of -1

After the commit 91d435fe 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: default avatarVitaly Osipov <vitaly.osipov@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent efc273ce
...@@ -499,7 +499,7 @@ int r8712_usbctrl_vendorreq(struct intf_priv *pintfpriv, u8 request, u16 value, ...@@ -499,7 +499,7 @@ int r8712_usbctrl_vendorreq(struct intf_priv *pintfpriv, u8 request, u16 value,
if (palloc_buf == NULL) { if (palloc_buf == NULL) {
dev_err(&udev->dev, "%s: Can't alloc memory for vendor request\n", dev_err(&udev->dev, "%s: Can't alloc memory for vendor request\n",
__func__); __func__);
return -1; return -ENOMEM;
} }
pIo_buf = palloc_buf + 16 - ((addr_t)(palloc_buf) & 0x0f); pIo_buf = palloc_buf + 16 - ((addr_t)(palloc_buf) & 0x0f);
if (requesttype == 0x01) { if (requesttype == 0x01) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment