brcmfmac: check return for ARP ip setting iovar
authorFranky Lin <frankyl@broadcom.com>
Wed, 17 Feb 2016 10:26:56 +0000 (11:26 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 7 Mar 2016 12:14:49 +0000 (14:14 +0200)
The return value of iovar set function should be saved and checked.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c

index 9507cc933c3b64952c6e7d9bd321d9263e5ecbaa..dcf9393ad8ff3ee2a93ba98abf41d7ffa5a02d7c 100644 (file)
@@ -1039,14 +1039,14 @@ static int brcmf_inetaddr_changed(struct notifier_block *nb,
                                return NOTIFY_OK;
                        }
                        for (i = 0; i < ARPOL_MAX_ENTRIES; i++) {
-                               if (addr_table[i] != 0) {
-                                       brcmf_fil_iovar_data_set(ifp,
-                                               "arp_hostip", &addr_table[i],
-                                               sizeof(addr_table[i]));
-                                       if (ret)
-                                               brcmf_err("add arp ip err %d\n",
-                                                         ret);
-                               }
+                               if (addr_table[i] == 0)
+                                       continue;
+                               ret = brcmf_fil_iovar_data_set(ifp, "arp_hostip",
+                                                              &addr_table[i],
+                                                              sizeof(addr_table[i]));
+                               if (ret)
+                                       brcmf_err("add arp ip err %d\n",
+                                                 ret);
                        }
                }
                break;