lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <5778D1D6-9C2B-4456-9765-213120076C62@gmail.com>
Date: Thu, 5 Dec 2024 19:51:00 -0500
From: Mingwei Zheng <zmw12306@...il.com>
To: Uwe Kleine-König <ukleinek@...nel.org>
Cc: fabrice.gasnier@...s.st.com,
 coquelin.stm32@...il.com,
 alexandre.torgue@...s.st.com,
 thierry.reding@...il.com,
 lee@...nel.org,
 linux-pwm@...r.kernel.org,
 linux-stm32@...md-mailman.stormreply.com,
 linux-arm-kernel@...ts.infradead.org,
 linux-kernel@...r.kernel.org,
 Jiasheng Jiang <jiashengjiangcool@...il.com>
Subject: Re: [PATCH] pwm: stm32-lp: Add check for clk_enable()



> On Dec 5, 2024, at 3:34 AM, Uwe Kleine-König <ukleinek@...nel.org> wrote:
> 
> On Thu, Dec 05, 2024 at 12:17:46AM -0500, Mingwei Zheng wrote:
>> Add check for the return value of clk_enable() to catch the potential
>> error.
> 
> Is this something that you actually hit, or just a janitoral fix you
> noticed while browsing the code (or reading some checker output)?

We detected this through static analysis, instead of actually hit.

> 
>> Fixes: e70a540b4e02 ("pwm: Add STM32 LPTimer PWM driver")
>> Signed-off-by: Mingwei Zheng <zmw12306@...il.com>
>> Signed-off-by: Jiasheng Jiang <jiashengjiangcool@...il.com>
>> ---
>> drivers/pwm/pwm-stm32-lp.c | 8 ++++++--
>> 1 file changed, 6 insertions(+), 2 deletions(-)
>> 
>> diff --git a/drivers/pwm/pwm-stm32-lp.c b/drivers/pwm/pwm-stm32-lp.c
>> index 989731256f50..4abef304417d 100644
>> --- a/drivers/pwm/pwm-stm32-lp.c
>> +++ b/drivers/pwm/pwm-stm32-lp.c
>> @@ -163,12 +163,16 @@ static int stm32_pwm_lp_get_state(struct pwm_chip *chip,
>> unsigned long rate = clk_get_rate(priv->clk);
>> u32 val, presc, prd;
>> u64 tmp;
>> + int ret;
> 
> Please move this variable to the block where it's used. No need for such
> a big scope.
> 
> Otherwise looks fine.
> 
> Best regards
> Uwe

Thank you! We will submit a v2 patch for you to review!

Best,
Mingwei


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ