summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorKumar Amit Mehta <gmate.amit@gmail.com>2013-02-18 12:13:44 (GMT)
committerJohn W. Linville <linville@tuxdriver.com>2013-02-18 20:30:40 (GMT)
commitb53cf458ea20dd7f5e32611366f63728e40c9021 (patch)
treeba0f346b11ed66e242c845586bff11ab6b7ce61c /drivers/net
parent488ec878034eccb852267b0e27ce9d511f75c587 (diff)
downloadlinux-fsl-qoriq-b53cf458ea20dd7f5e32611366f63728e40c9021.tar.xz
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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/hostap/hostap_ap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/hostap/hostap_ap.c b/drivers/net/wireless/hostap/hostap_ap.c
index c6ea995..dd9a18f 100644
--- a/drivers/net/wireless/hostap/hostap_ap.c
+++ b/drivers/net/wireless/hostap/hostap_ap.c
@@ -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);