Re: [PATCH v2] pwm: bcm-iproc: handle clk_get_rate() return

From: Scott Branden
Date: Fri Jul 17 2020 - 19:11:47 EST




On 2020-07-17 4:04 p.m., Uwe Kleine-König wrote:
On Fri, Jul 17, 2020 at 11:25:12AM -0700, Scott Branden wrote:
From: Rayagonda Kokatanur <rayagonda.kokatanur@xxxxxxxxxxxx>

Handle clk_get_rate() returning <= 0 condition to avoid
possible division by zero.
You advertise handling <= 0, but in the code only == 0 is checked. One
of the two is wrong ...
I checked - clk_get_rate can't return negative values.
I'll update the commit message from <= to ==.

Best regards
Uwe

Thanks,
 Scott