Commit 48735928 authored by Takashi Iwai's avatar Takashi Iwai Committed by Jiri Kosina
Browse files

HID: uclogic: Fix regression of input name assignment



The previous fix for adding the devm_kasprintf() return check in the
commit bd07f751 ("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: bd07f751 ("HID: uclogic: Add NULL check in uclogic_input_configured()")
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.com>
parent ae4ac077
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -184,7 +184,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)