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>
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) {