[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2946B411-6566-4B43-A7DE-DEBD13D76F3D@live.com>
Date: Wed, 18 Jun 2025 13:00:11 +0000
From: Aditya Garg <gargaditya08@...e.com>
To: Qasim Ijaz <qasdev00@...il.com>
CC: "jikos@...nel.org" <jikos@...nel.org>, "bentiss@...nel.org"
<bentiss@...nel.org>, "linux-input@...r.kernel.org"
<linux-input@...r.kernel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "stable@...r.kernel.org"
<stable@...r.kernel.org>
Subject: Re: [PATCH] HID: appletb-kbd: fix "appletb_backlight" backlight
device reference counting
Hi Qasim
> During appletb_kbd_probe, probe attempts to get the backlight device
> by name. When this happens backlight_device_get_by_name looks for a
> device in the backlight class which has name "appletb_backlight" and
> upon finding a match it increments the reference count for the device
> and returns it to the caller. However this reference is never released
> leading to a reference leak.
Good catch.
> Fix this by decrementing the backlight device reference count on removal
> via put_device and on probe failure.
Thanks for the fix!
> Fixes: 93a0fc489481 ("HID: hid-appletb-kbd: add support for automatic brightness control while using the touchbar")
> Cc: stable@...r.kernel.org
> Signed-off-by: Qasim Ijaz <qasdev00@...il.com>
Reviewed-by: Aditya Garg <gargaditya08@...e.com>
Powered by blists - more mailing lists