Re: [PATCH 1/2] firmware: raspberrypi: Handle device registration errors
From: Stefan Wahren
Date: Sat Sep 19 2026 - 12:06:18 EST
Am 19.09.26 um 05:48 schrieb Triet Hoang:
Check the return value of platform_device_register_data() whenReviewed-by: Stefan Wahren <wahrenst@xxxxxxx>
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@xxxxxxxxx>