ath11k: Handle errors if peer creation fails
authorAlex Dewar <alex.dewar90@gmail.com>
Sat, 7 Nov 2020 08:16:29 +0000 (10:16 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 10 Nov 2020 18:14:36 +0000 (20:14 +0200)
commitc134d1f8c436d96b3f62896c630278e3ec001280
treeb43e63b816d1397664952410cc79b603a12626cd
parentb96fab4e36023ee37ed1aad331ddd11b77c46c42
ath11k: Handle errors if peer creation fails

ath11k_peer_create() is called without its return value being checked,
meaning errors will be unhandled. Add missing check and, as the mutex is
unconditionally unlocked on leaving this function, simplify the exit
path.

Addresses-Coverity-ID: 1497531 ("Code maintainability issues")
Fixes: 701e48a43e15 ("ath11k: add packet log support for QCA6390")
Signed-off-by: Alex Dewar <alex.dewar90@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20201004100218.311653-1-alex.dewar90@gmail.com
drivers/net/wireless/ath/ath11k/mac.c