[PATCH] staging: wilc1000: fixed the wrong error code
Atul Raj
atulraj.nith at gmail.com
Thu Dec 1 18:23:50 UTC 2016
On Thu, Dec 1, 2016 at 1:03 AM, Dan Carpenter <dan.carpenter at oracle.com> wrote:
> On Thu, Dec 01, 2016 at 12:58:45AM +0530, Atul Raj wrote:
>> ENOENT is error code for <No such file or directory>
>> ENOMEM should be used for <out of memory error>
>>
>> Signed-off-by: Atul Raj <atulraj.nith at gmail.com>
> Changelog doesn't match the patch.
Sorry for the mistake. Please check the corrected version.
EFAULT is error code for <bad address>
ENOMEM should be used for <out of memory error>
Signed-off-by: Atul Raj <atulraj.nith at gmail.com>
---
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 60d8b05..971956f 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -1642,7 +1642,7 @@ static int mgmt_tx(struct wiphy *wiphy,
if (ieee80211_is_mgmt(mgmt->frame_control)) {
mgmt_tx = kmalloc(sizeof(struct p2p_mgmt_data), GFP_KERNEL);
if (!mgmt_tx)
- return -EFAULT;
+ return -ENOMEM;
mgmt_tx->buff = kmalloc(buf_len, GFP_KERNEL);
if (!mgmt_tx->buff) {
--
2.10.2.windows.1
Regards
Atul Raj
More information about the devel
mailing list