diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-02-10 12:05:40 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-11 19:31:50 -0800 |
commit | d99ee289b4acf29770a33f76c7f98b466f70e91d (patch) | |
tree | c9972c3959bedd7d88b471788fc03fa34ab57f87 /drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | |
parent | 59ca8f20b19b652d6961c3f78ccc7aab149a1930 (diff) | |
download | op-kernel-dev-d99ee289b4acf29770a33f76c7f98b466f70e91d.zip op-kernel-dev-d99ee289b4acf29770a33f76c7f98b466f70e91d.tar.gz |
staging: wilc1000: fix mgmt_tx()
There was a missing curly brace so this function returns failure instead
of succeeding.
Fixes: 06fb9336acdc ('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>
Diffstat (limited to 'drivers/staging/wilc1000/wilc_wfi_cfgoperations.c')
-rw-r--r-- | drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index bf264d3..97d1b80 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -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; |