]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
HID: i2c-hid-of: fix NULL-deref on failed power up
authorJohan Hovold <johan+linaro@kernel.org>
Fri, 26 Jan 2024 17:09:01 +0000 (18:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 08:51:30 +0000 (09:51 +0100)
commite28d6b63aeecbda450935fb58db0e682ea8212d3
tree804506ac0fff32c25342f7fcdca66865b3f717d2
parent46b08e8f1baef9d4fb92b4fad2ac6fda458bcbc6
HID: i2c-hid-of: fix NULL-deref on failed power up

commit 00aab7dcb2267f2aef59447602f34501efe1a07f upstream.

A while back the I2C HID implementation was split in an ACPI and OF
part, but the new OF driver never initialises the client pointer which
is dereferenced on power-up failures.

Fixes: b33752c30023 ("HID: i2c-hid: Reorganize so ACPI and OF are separate modules")
Cc: stable@vger.kernel.org # 5.12
Cc: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hid/i2c-hid/i2c-hid-of.c