From 0fffd39b42b84f8c0142dce51d1875a44e7d1eb6 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sun, 23 Jan 2022 17:23:12 +0100 Subject: [PATCH] 5.15-stable patches added patches: hid-magicmouse-fix-an-error-handling-path-in-magicmouse_probe.patch --- ...or-handling-path-in-magicmouse_probe.patch | 36 +++++++++++++++++++ queue-5.15/series | 1 + 2 files changed, 37 insertions(+) create mode 100644 queue-5.15/hid-magicmouse-fix-an-error-handling-path-in-magicmouse_probe.patch diff --git a/queue-5.15/hid-magicmouse-fix-an-error-handling-path-in-magicmouse_probe.patch b/queue-5.15/hid-magicmouse-fix-an-error-handling-path-in-magicmouse_probe.patch new file mode 100644 index 00000000000..b374b28296d --- /dev/null +++ b/queue-5.15/hid-magicmouse-fix-an-error-handling-path-in-magicmouse_probe.patch @@ -0,0 +1,36 @@ +From 33812fc7c8d77a43b7e2bf36a0d5a57c277a4b0c Mon Sep 17 00:00:00 2001 +From: Christophe JAILLET +Date: Tue, 28 Dec 2021 22:09:17 +0100 +Subject: HID: magicmouse: Fix an error handling path in magicmouse_probe() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Christophe JAILLET + +commit 33812fc7c8d77a43b7e2bf36a0d5a57c277a4b0c upstream. + +If the timer introduced by the commit below is started, then it must be +deleted in the error handling of the probe. Otherwise it would trigger +once the driver is no more. + +Fixes: 0b91b4e4dae6 ("HID: magicmouse: Report battery level over USB") +Signed-off-by: Christophe JAILLET +Tested-by: José Expósito +Reported-by: +Signed-off-by: Jiri Kosina +Signed-off-by: Greg Kroah-Hartman +--- + drivers/hid/hid-magicmouse.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/hid/hid-magicmouse.c ++++ b/drivers/hid/hid-magicmouse.c +@@ -873,6 +873,7 @@ static int magicmouse_probe(struct hid_d + + return 0; + err_stop_hw: ++ del_timer_sync(&msc->battery_timer); + hid_hw_stop(hdev); + return ret; + } diff --git a/queue-5.15/series b/queue-5.15/series index 7f6d674a2cc..125b270713b 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -676,3 +676,4 @@ mfd-tps65910-set-pwr_off-bit-during-driver-probe.patch spi-uniphier-fix-a-bug-that-doesn-t-point-to-private-data-correctly.patch xen-gntdev-fix-unmap-notification-order.patch md-move-alloc-free-acct-bioset-in-to-personality.patch +hid-magicmouse-fix-an-error-handling-path-in-magicmouse_probe.patch -- 2.47.3