* [PATCH] toshiba_acpi: return on a fail path
@ 2009-07-13 21:25 Jiri Slaby
0 siblings, 0 replies; only message in thread
From: Jiri Slaby @ 2009-07-13 21:25 UTC (permalink / raw)
To: akpm; +Cc: linux-acpi, lenb, linux-kernel, Jiri Slaby
Return from bt_rfkill_poll when hci_get_radio_state fails.
value is invalid in that case and should not be assigned to the
rfkill state.
This also fixes a double unlock bug.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
drivers/platform/x86/toshiba_acpi.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index 81d31ea..51c0a8b 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -335,6 +335,7 @@ static void bt_rfkill_poll(struct rfkill *rfkill, void *data)
if (hci_result != HCI_SUCCESS) {
/* Can't do anything useful */
mutex_unlock(&dev->mutex);
+ return;
}
new_rfk_state = value;
--
1.6.3.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-07-13 21:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-13 21:25 [PATCH] toshiba_acpi: return on a fail path Jiri Slaby
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®