rtc: stmp3xxx: Add failure handling for stmp3xxx_wdt_register()
Use platform_device_put() to free platform device before print error message when platform_device_add() fails to run. Fixes: 1a71fb84 ("rtc: stmp3xxx: add wdt-accessor function") Signed-off-by: Lin Yujun <linyujun809@huawei.com> Reviewed-by: Wolfram Sang <wsa@kernel.org> Link: https://lore.kernel.org/r/20220915065253.43668-1-linyujun809@huawei.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Showing
Please register or sign in to comment