Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: rtl8712: return -ENOMEM instead of -1

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>

authored by

Vitaly Osipov and committed by
Greg Kroah-Hartman
735e33fa efc273ce

+1 -1
+1 -1
drivers/staging/rtl8712/usb_ops_linux.c
··· 499 499 if (palloc_buf == NULL) { 500 500 dev_err(&udev->dev, "%s: Can't alloc memory for vendor request\n", 501 501 __func__); 502 - return -1; 502 + return -ENOMEM; 503 503 } 504 504 pIo_buf = palloc_buf + 16 - ((addr_t)(palloc_buf) & 0x0f); 505 505 if (requesttype == 0x01) {