Re: [PATCH v4 2/5] HID: asus: remove unnecessary OOM message

From: Antheas Kapenekakis

Date: Mon Jun 15 2026 - 17:53:12 EST


On Mon, 15 Jun 2026 at 18:51, Denis Benato <denis.benato@xxxxxxxxx> wrote:
>
> If devm_kzalloc fails an allocation error is already being reported:
> there is no need for the driver to repeat it, moreover if this were
> new code checkpatch.pl would throw a warning.

Perhaps something more of:

HID: asus: remove extraneous allocation warning

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

Reviewed-by: Antheas Kapenekakis <lkml@xxxxxxxxxxx>

> Signed-off-by: Denis Benato <denis.benato@xxxxxxxxx>
> ---
> drivers/hid/hid-asus.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
> index 05ca6665e0a4..bbf964b12c16 100644
> --- a/drivers/hid/hid-asus.c
> +++ b/drivers/hid/hid-asus.c
> @@ -1377,10 +1377,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);
>
> --
> 2.47.3
>
>