Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1ba45b9e authored by Larry Finger's avatar Larry Finger Committed by John W. Linville
Browse files

ath9k: Fix a smatch warnings



Smatch shows the following warnings:

  CHECK   drivers/net/wireless/ath/ath9k/htc_drv_main.c
drivers/net/wireless/ath/ath9k/htc_drv_main.c +1315 ath9k_htc_configure_filter(27) warn: inconsistent returns mutex:&priv->mutex: locked (1303) unlocked (1315)

  CHECK   drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +3321 ar9300_eeprom_restore_internal(20) warn: returning -1 instead of -ENOMEM is sloppy

Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent cf3af748
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -3318,7 +3318,7 @@ static int ar9300_eeprom_restore_internal(struct ath_hw *ah,


	word = kzalloc(2048, GFP_KERNEL);
	word = kzalloc(2048, GFP_KERNEL);
	if (!word)
	if (!word)
		return -1;
		return -ENOMEM;


	memcpy(mptr, &ar9300_default, mdata_size);
	memcpy(mptr, &ar9300_default, mdata_size);


+1 −0
Original line number Original line Diff line number Diff line
@@ -1300,6 +1300,7 @@ static void ath9k_htc_configure_filter(struct ieee80211_hw *hw,
	if (priv->op_flags & OP_INVALID) {
	if (priv->op_flags & OP_INVALID) {
		ath_dbg(ath9k_hw_common(priv->ah), ATH_DBG_ANY,
		ath_dbg(ath9k_hw_common(priv->ah), ATH_DBG_ANY,
			"Unable to configure filter on invalid state\n");
			"Unable to configure filter on invalid state\n");
		mutex_unlock(&priv->mutex);
		return;
		return;
	}
	}
	ath9k_htc_ps_wakeup(priv);
	ath9k_htc_ps_wakeup(priv);