mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
net: wireless: hostap: hostap_ap.c: Return -ENOMEM instead of -1 for if kmalloc() fails.
When memory allocation using, kmalloc() fails, report appropriate error value. Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
488ec87803
commit
b53cf458ea
@ -376,7 +376,7 @@ int ap_control_add_mac(struct mac_restrictions *mac_restrictions, u8 *mac)
|
||||
|
||||
entry = kmalloc(sizeof(struct mac_entry), GFP_KERNEL);
|
||||
if (entry == NULL)
|
||||
return -1;
|
||||
return -ENOMEM;
|
||||
|
||||
memcpy(entry->addr, mac, ETH_ALEN);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user