Re: [PATCH v1] platform/x86: xo15-ebook: Use devres-based resource management
From: Andy Shevchenko
Date: Wed May 13 2026 - 16:42:54 EST
On Wed, May 13, 2026 at 08:53:44PM +0200, Rafael J. Wysocki wrote:
> Use devm_kzalloc() and devm_input_allocate_device() in
> ebook_switch_probe() for allocating the button object and the
> input device, respectively, to simplify the rollback path in
> that function and ebook_switch_remove().
...
> id = acpi_match_acpi_device(ebook_device_ids, device);
> if (!id) {
> - dev_err(&pdev->dev, "Unsupported hid\n");
> - error = -ENODEV;
> - goto err_free_input;
> + dev_err(dev, "Unsupported hid\n");
> + return -ENODEV;
Now we can use
return dev_err_probe(dev, -ENODEV, "Unsupported hid\n");
> }
--
With Best Regards,
Andy Shevchenko