1. 26 Sep, 2016 13 commits
  2. 19 Sep, 2016 25 commits
  3. 17 Sep, 2016 2 commits
    • Colin Ian King's avatar
      mwifiex: fix null pointer deference when adapter is null · 80ba4f1d
      Colin Ian King authored
      If adapter is null the error exit path in mwifiex_shutdown_sw is
      to down the semaphore sem and print some debug via mwifiex_dbg.
      However, passing a NULL adapter to mwifiex_dbg causes a null
      pointer deference when accessing adapter->dev.  This fix checks
      for a null adapter at the start of the function and to exit
      without the need to up the semaphore and we also skip the debug
      to avoid the null pointer dereference.
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      80ba4f1d
    • Bob Copeland's avatar
      mwifiex: fix error handling in mwifiex_create_custom_regdomain · 92ca4f92
      Bob Copeland authored
      smatch reports:
      
      sta_cmdresp.c:1053 mwifiex_create_custom_regdomain() warn: possible memory leak of 'regd'
      
      Indeed, mwifiex_create_custom_regdomain() returns NULL in the
      case that channel is missing in the TLV without freeing regd.
      
      Moreover, some other error paths in this function return ERR_PTR
      values which are assigned without checking to the regd field in
      the mwifiex_adapter struct.  The latter is only null-checked where
      used.
      
      Fix by freeing regd in the error path, and only update
      priv->adapter->regd if the returned pointer is valid.
      
      Cc: Amitkumar Karwar <akarwar@marvell.com>
      Cc: Nishant Sarmukadam <nishants@marvell.com>
      Signed-off-by: default avatarBob Copeland <me@bobcopeland.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      92ca4f92