Skip to contentSkip to conversation

toshiba_acpi: return on a fail path

PATCH New Jiri Slaby 1 participant 1 message Jul 13, 2009

Subsystems (3)
lore
Share & tools
lore

Jiri Slaby

author
#0 lore raw

PATCH 1/1 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.

---
 drivers/platform/x86/toshiba_acpi.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/platform/x86/toshiba_acpi.c +1 -0
index 81d31ea..51c0a8b 100644
@@ -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;
Signature · 1 line
1.6.3.2