Explorar el Código

staging: csr: sme_blocking.c: add missing check for return of sme_wait_for_reply

sme_ap_config misses a check of the return of the sme_wait_for_reply
as all other functions do here, for the return of sme_wait_for_reply
add the check and fail if it returns other than 0.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga hace 13 años
padre
commit
a6de05d87a
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      drivers/staging/csr/sme_blocking.c

+ 2 - 0
drivers/staging/csr/sme_blocking.c

@@ -1455,6 +1455,8 @@ int sme_ap_config(unifi_priv_t *priv,
                                  *ap_mac_config);
                                  *ap_mac_config);
 
 
     r = sme_wait_for_reply(priv, UNIFI_SME_MGT_SHORT_TIMEOUT);
     r = sme_wait_for_reply(priv, UNIFI_SME_MGT_SHORT_TIMEOUT);
+	if (r)
+		return r;
 
 
     unifi_trace(priv, UDBG4,
     unifi_trace(priv, UDBG4,
                 "sme_ap_config <-- (r=%d status=%d)\n",
                 "sme_ap_config <-- (r=%d status=%d)\n",