mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 11:23:09 -04:00
staging: wilc1000: fix mgmt_tx()
There was a missing curly brace so this function returns failure instead
of succeeding.
Fixes: 06fb9336ac ('staging: wilc1000: wilc_wfi_cfgoperations.c: replaces PRINT_ER with netdev_err')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
59ca8f20b1
commit
d99ee289b4
@@ -1832,9 +1832,10 @@ static int mgmt_tx(struct wiphy *wiphy,
|
||||
return -EFAULT;
|
||||
|
||||
mgmt_tx->buff = kmalloc(buf_len, GFP_KERNEL);
|
||||
if (!mgmt_tx->buff)
|
||||
if (!mgmt_tx->buff) {
|
||||
kfree(mgmt_tx);
|
||||
return -EFAULT;
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
memcpy(mgmt_tx->buff, buf, len);
|
||||
mgmt_tx->size = len;
|
||||
|
||||
Reference in New Issue
Block a user