[PATCH 1/2] firmware: raspberrypi: Handle device registration errors
Stefan Wahren
wahrenst at gmx.net
Sat Sep 19 09:05:49 PDT 2026
Am 19.09.26 um 05:48 schrieb Triet Hoang:
> Check the return value of platform_device_register_data() when
> registering the hwmon and clock devices. Propagate registration failures
> to the firmware probe instead of silently ignoring them.
>
> Use local platform device pointers so the global pointers are only
> updated after successful registration. If clock registration fails,
> unregister the previously registered hwmon device before releasing the
> firmware instance.
>
> Keep the existing behavior of skipping hwmon registration when the
> RPI_FIRMWARE_GET_THROTTLED request fails.
>
> Fixes: 70eea1bbb556 ("firmware: raspberrypi: Register hwmon driver")
> Fixes: 91f2cf4a6b21 ("firmware: raspberrypi: register clk device")
> Signed-off-by: Triet Hoang <triet.hoang.dev at gmail.com>
Reviewed-by: Stefan Wahren <wahrenst at gmx.net>
More information about the linux-arm-kernel
mailing list