Skip to content

Commit

Permalink
ath6kl: Return a proper error code when not in connected state
Browse files Browse the repository at this point in the history
Error code ENOTCONN is more suitable than EINVAL to report
when the driver is not in connected state in ath6kl_wow_suspend().

I found this during code review.

Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
  • Loading branch information
Raja Mani authored and Kalle Valo committed Jan 30, 2012
1 parent 081c7a8 commit 3c411a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath6kl/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -1916,7 +1916,7 @@ static int ath6kl_wow_suspend(struct ath6kl *ar, struct cfg80211_wowlan *wow)
return -EIO;

if (!test_bit(CONNECTED, &vif->flags))
return -EINVAL;
return -ENOTCONN;

if (wow && (wow->n_patterns > WOW_MAX_FILTERS_PER_LIST))
return -EINVAL;
Expand Down

0 comments on commit 3c411a4

Please sign in to comment.