Commit ad6caaf2 authored by Henry Martin's avatar Henry Martin Committed by Greg Kroah-Hartman
Browse files

HID: uclogic: Add NULL check in uclogic_input_configured()



[ Upstream commit bd07f751 ]

devm_kasprintf() returns NULL when memory allocation fails. Currently,
uclogic_input_configured() does not check for this case, which results
in a NULL pointer dereference.

Add NULL check after devm_kasprintf() to prevent this issue.

Fixes: dd613a4e ("HID: uclogic: Correct devm device reference for hidinput input_dev name")
Signed-off-by: default avatarHenry Martin <bsdhenrymartin@gmail.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 4715f16b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment