HID: asus: remove extraneous OOM error

If devm_kzalloc fails an allocation error is already being reported:
no need to repeat it. For new code this behavior is disincentivized
and checkpatch.pl reports a warning.

Reviewed-by: Antheas Kapenekakis <lkml@antheas.dev>
Signed-off-by: Denis Benato <denis.benato@linux.dev>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
This commit is contained in:
Denis Benato 2026-06-19 00:11:00 +00:00 committed by Jiri Kosina
parent 47669bec44
commit fb572e2f23

View File

@ -1379,10 +1379,8 @@ static int asus_probe(struct hid_device *hdev, const struct hid_device_id *id)
int ret;
drvdata = devm_kzalloc(&hdev->dev, sizeof(*drvdata), GFP_KERNEL);
if (drvdata == NULL) {
hid_err(hdev, "Can't alloc Asus descriptor\n");
if (drvdata == NULL)
return -ENOMEM;
}
hid_set_drvdata(hdev, drvdata);