diff options
author | Arend Van Spriel <arend.vanspriel@broadcom.com> | 2018-01-22 23:46:39 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-01-24 19:02:38 +0300 |
commit | 5242a5444e0b6464d7455beb55d936dd192b5e9d (patch) | |
tree | 57827c931ce7f32988da71d4d0e47ba0cd841d29 /drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil.c | |
parent | c93fe71c91d0ae9eb6a82e887cd076c51d647d5f (diff) | |
download | linux-5242a5444e0b6464d7455beb55d936dd192b5e9d.tar.xz |
brcmfmac: assure bcdc dcmd api does not return value > 0
The protocol layer api defines callbacks for dongle commands.
Although not really well documented these should only return an
error code in case of an error, or 0 upon success. In the bcdc
protocol it can return value above 0 and we carry a fix in the
caller of the protocol layer api. This patch makes it adhere to
the intent of the api as described above.
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil.c')
-rw-r--r-- | drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil.c index f6a2df94dba7..d328aae0a0a4 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil.c @@ -121,11 +121,9 @@ brcmf_fil_cmd_data(struct brcmf_if *ifp, u32 cmd, void *data, u32 len, bool set) else err = brcmf_proto_query_dcmd(drvr, ifp->ifidx, cmd, data, len); - if (err >= 0) - return 0; - - brcmf_dbg(FIL, "Failed: %s (%d)\n", - brcmf_fil_get_errstr((u32)(-err)), err); + if (err) + brcmf_dbg(FIL, "Failed: %s (%d)\n", + brcmf_fil_get_errstr((u32)(-err)), err); return err; } |