Re: [PATCH] m68k/amiga: fix missing platform_device_unregister() on error in amiga_init_devices()

From: Geert Uytterhoeven
Date: Mon Jul 04 2022 - 03:35:27 EST


Hi Yang,

On Mon, Jul 4, 2022 at 9:27 AM Yang Yingliang <yangyingliang@xxxxxxxxxx> wrote:
> Add the missing platform_device_unregister() before return
> from amiga_init_devices() in the error handling case.
>
> Fixes: eeed227966da ("m68k/amiga: Add error checks when registering platform devices")
> Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
> Signed-off-by: Yang Yingliang <yangyingliang@xxxxxxxxxx>

Thanks for your patch!

TBH, I don't think it's worth adding this code: this happens during early
kernel startup. If any of these devices fail to register, that must happen
because the system ran out of memory, and thus won't work anyway.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds