Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b53cf458 authored by Kumar Amit Mehta's avatar Kumar Amit Mehta Committed by John W. Linville
Browse files

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: default avatarKumar Amit Mehta <gmate.amit@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 488ec878
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);