summaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorJiri Slaby2009-08-07 00:57:51 +0200
committerLen Brown2009-08-28 21:17:07 +0200
commit82e7784f57a81faf673b09bc468e736d582fe754 (patch)
treeb2869be47566c2aca2aa65fc825b2e637ced85fc /drivers/platform
parentACPICA: Windows compatibility fix: same buffer/string store (diff)
downloadkernel-qcow2-linux-82e7784f57a81faf673b09bc468e736d582fe754.tar.gz
kernel-qcow2-linux-82e7784f57a81faf673b09bc468e736d582fe754.tar.xz
kernel-qcow2-linux-82e7784f57a81faf673b09bc468e736d582fe754.zip
toshiba_acpi: return on a fail path
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> Cc: John W. Linville <linville@tuxdriver.com> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/toshiba_acpi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index 81d31ea507d1..51c0a8bee414 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;