diff options
| author | Denis Benato <denis.benato@linux.dev> | 2026-06-19 00:11:00 +0000 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.com> | 2026-08-03 19:25:32 +0200 |
| commit | fb572e2f2347ece90e1b1002fb1595d57b8aed93 (patch) | |
| tree | 452a410f3970f94ef8d7aa5a0d73e7b3faeed2d1 | |
| parent | 47669bec44fe12fe2c7adf2b299e980d7935a2ce (diff) | |
| download | linux-fb572e2f2347ece90e1b1002fb1595d57b8aed93.tar.gz linux-fb572e2f2347ece90e1b1002fb1595d57b8aed93.zip | |
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>
| -rw-r--r-- | drivers/hid/hid-asus.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c index 98597e097e71..c7850ae2f8e1 100644 --- a/drivers/hid/hid-asus.c +++ b/drivers/hid/hid-asus.c @@ -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); |
