mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
HID: uclogic: Fix regression of input name assignment
[ Upstream commit4873592845] The previous fix for adding the devm_kasprintf() return check in the commitbd07f75120("HID: uclogic: Add NULL check in uclogic_input_configured()") changed the condition of hi->input->name assignment, and it resulted in missing the proper input device name when no custom suffix is defined. Restore the conditional to the original content to address the regression. Fixes:bd07f75120("HID: uclogic: Add NULL check in uclogic_input_configured()") Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jiri Kosina <jkosina@suse.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a2d1c81934
commit
58ab91af41
@@ -142,7 +142,9 @@ static int uclogic_input_configured(struct hid_device *hdev,
|
||||
suffix = "System Control";
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
if (suffix) {
|
||||
hi->input->name = devm_kasprintf(&hdev->dev, GFP_KERNEL,
|
||||
"%s %s", hdev->name, suffix);
|
||||
if (!hi->input->name)
|
||||
|
||||
Reference in New Issue
Block a user