]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Input: ipaq-micro-keys - add error handling for devm_kmemdup
authorHaoran Liu <liuhaoran14@163.com>
Sun, 3 Dec 2023 19:00:23 +0000 (19:00 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 1 Jan 2024 12:39:01 +0000 (12:39 +0000)
commit66ccf5f7437a79a3a8c50caea14cbe80be98ee9f
tree5a5d45939fcc6a7939ebcce9933583b739654bc0
parent3637f6bdfe2ccd53c493836b6e43c9a73e4513b3
Input: ipaq-micro-keys - add error handling for devm_kmemdup

[ Upstream commit 59b6a747e2d39227ac2325c5e29d6ab3bb070c2a ]

Check the return value of i2c_add_adapter. Static analysis revealed that
the function did not properly handle potential failures of
i2c_add_adapter, which could lead to partial initialization of the I2C
adapter and unstable operation.

Signed-off-by: Haoran Liu <liuhaoran14@163.com>
Link: https://lore.kernel.org/r/20231203164653.38983-1-liuhaoran14@163.com
Fixes: d7535ffa427b ("Input: driver for microcontroller keys on the iPaq h3xxx")
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/input/keyboard/ipaq-micro-keys.c