[PATCH] pwm: sun4i: Propagate errors in .get_state() to the caller

Jernej Škrabec jernej.skrabec at gmail.com
Sat Dec 3 01:50:10 PST 2022


Dne četrtek, 01. december 2022 ob 16:22:23 CET je Andre Przywara napisal(a):
> .get_state() can return an error indication now. Make use of it to
> propagate an impossible prescaler encoding, should that have sneaked in
> somehow.
> Also check the return value of clk_get_rate(). That's unlikely to fail,
> but we use that in two divide operations down in the code, so let's
> avoid a divide-by-zero condition on the way.
> 
> Signed-off-by: Andre Przywara <andre.przywara at arm.com>

Reviewed-by: Jernej Skrabec <jernej.skrabec at gmail.com>

Best regards,
Jernej





More information about the linux-arm-kernel mailing list