Re: [PATCH] usb: hub: Set proper message when usb_hub_create_port_device() fails
From: Andy Shevchenko
Date: Tue Aug 11 2026 - 03:14:47 EST
On Tue, Aug 11, 2026 at 11:51:07AM +0800, Chen-Yu Tsai wrote:
> On Tue, Aug 11, 2026 at 12:31 AM Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> > On Tue, Jul 28, 2026 at 06:00:04PM +0800, Chen-Yu Tsai wrote:
...
> > The 'message' is local to the function, why devm?
> > Shouldn't __free() be sufficient?
>
> I hadn't thought of that.
>
> The scope shouldn't be a problem, since it's declared and used at the top
> level. But we'd need a kfree_const() variant of __free(kfree). All the
> other error messages are just plain C string constants.
Sure, I just sent a patch.
--
With Best Regards,
Andy Shevchenko