1
0
Fork 0

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>
wifi-calibration
Kumar Amit Mehta 2013-02-18 04:13:44 -08:00 committed by John W. Linville
parent 488ec87803
commit b53cf458ea
1 changed files with 1 additions and 1 deletions

View File

@ -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);