From: Dan Carpenter <dan.carpenter@oracle.com>
To: Kalle Valo <kvalo@codeaurora.org>, Ram Amrani <ramrani@ti.com>
Cc: Eliad Peller <eliad@wizery.com>,
"John W. Linville" <linville@tuxdriver.com>,
Arik Nemtsov <arik@wizery.com>,
Johannes Berg <johannes.berg@intel.com>,
David Spinadel <david.spinadel@intel.com>,
Luciano Coelho <luciano.coelho@intel.com>,
linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] wlcore: unlock on error in wl1271_op_suspend()
Date: Thu, 15 Jan 2015 14:43:40 +0300 [thread overview]
Message-ID: <20150115114340.GC17976@mwanda> (raw)
We recently introduced a new error path which needs an unlock.
Fixes: 6d5a748d4836 ('wlcore: add ability to reduce FW interrupts during suspend')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Static checker fix. It's possible that wl1271_ps_elp_wakeup() unlocks
on error but I didn't see it, and that would be an ugly API.
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index e90fb78..02f0e86 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -1785,8 +1785,10 @@ static int wl1271_op_suspend(struct ieee80211_hw *hw,
mutex_lock(&wl->mutex);
ret = wl1271_ps_elp_wakeup(wl);
- if (ret < 0)
+ if (ret < 0) {
+ mutex_unlock(&wl->mutex);
return ret;
+ }
wl->wow_enabled = true;
wl12xx_for_each_wlvif(wl, wlvif) {
next reply other threads:[~2015-01-15 11:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-15 11:43 Dan Carpenter [this message]
2015-01-15 12:34 ` [patch] wlcore: unlock on error in wl1271_op_suspend() Eliad Peller
2015-01-23 17:38 ` Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150115114340.GC17976@mwanda \
--to=dan.carpenter@oracle.com \
--cc=arik@wizery.com \
--cc=david.spinadel@intel.com \
--cc=eliad@wizery.com \
--cc=johannes.berg@intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=luciano.coelho@intel.com \
--cc=ramrani@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).