mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 09:41:03 +02:00
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:
parent
47669bec44
commit
fb572e2f23
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user