From: Jiri Slaby <jirislaby@xxxxxxxxx> 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@xxxxxxxxx> Cc: John W. Linville <linville@xxxxxxxxxxxxx> Cc: Johannes Berg <johannes@xxxxxxxxxxxxxxxx> Cc: Len Brown <len.brown@xxxxxxxxx> Cc: Henrique de Moraes Holschuh <hmh@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/platform/x86/toshiba_acpi.c | 1 + 1 file changed, 1 insertion(+) diff -puN drivers/platform/x86/toshiba_acpi.c~toshiba_acpi-return-on-a-fail-path drivers/platform/x86/toshiba_acpi.c --- a/drivers/platform/x86/toshiba_acpi.c~toshiba_acpi-return-on-a-fail-path +++ a/drivers/platform/x86/toshiba_acpi.c @@ -335,6 +335,7 @@ static void bt_rfkill_poll(struct rfkill if (hci_result != HCI_SUCCESS) { /* Can't do anything useful */ mutex_unlock(&dev->mutex); + return; } new_rfk_state = value; _ -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html