Re: [PATCH] accel/rocket: Unregister the platform device if driver registration fails

From: Krzysztof Kozlowski

Date: Tue Nov 03 2026 - 02:12:05 EST


On 03/11/2026 07:23, Wentao Liang wrote:
> rocket_register() registers the facade platform device before registering
> the platform driver. If platform_driver_register() fails, module
> initialization returns an error without unregistering the device. The
> module exit function is not called after a failed initialization, so the
> platform device and its resources remain registered.
>
> Unregister the platform device when driver registration fails.
>
> Fixes: ed98261b4168 ("accel/rocket: Add a new driver for Rockchip's NPU")
> Cc: stable@xxxxxxxxxxxxxxx
> Assisted-by: DeepSeek-V4.1-Flash and OpenAI Codex

Not even bothering to run checkpatch.

> Signed-off-by: Wentao Liang <vulab@xxxxxxxxxxx>

Another fake identity of "vulab" doing exactly the same as other cases,
repeating same mistake of running unsupervised crappy bot even though
was asked multiple times to fix that.

Best regards,
Krzysztof