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] [thread-next>] [day] [month] [year] [list]
Message-ID: <cff1ddb5-b438-4287-80cf-3969f7b7b767@kernel.org>
Date: Tue, 13 May 2025 09:54:48 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Dan Carpenter <dan.carpenter@...aro.org>,
 Patrice Chotard <patrice.chotard@...s.st.com>
Cc: Rob Herring <robh@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
 Maxime Coquelin <mcoquelin.stm32@...il.com>,
 Alexandre Torgue <alexandre.torgue@...s.st.com>,
 Philipp Zabel <p.zabel@...gutronix.de>,
 Krzysztof Kozlowski <krzk+dt@...nel.org>,
 Catalin Marinas <catalin.marinas@....com>, Will Deacon <will@...nel.org>,
 christophe.kerello@...s.st.com, linux-kernel@...r.kernel.org,
 devicetree@...r.kernel.org, linux-stm32@...md-mailman.stormreply.com,
 linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v11 2/3] memory: Add STM32 Octo Memory Manager driver

On 09/05/2025 10:32, Dan Carpenter wrote:
> On Mon, Apr 28, 2025 at 10:58:31AM +0200, Patrice Chotard wrote:
>> +static int stm32_omm_toggle_child_clock(struct device *dev, bool enable)
>> +{
>> +	struct stm32_omm *omm = dev_get_drvdata(dev);
>> +	int i, ret;
>> +
>> +	for (i = 0; i < omm->nb_child; i++) {
>> +		if (enable) {
>> +			ret = clk_prepare_enable(omm->clk_bulk[i + 1].clk);
>> +			if (ret) {
>> +				dev_err(dev, "Can not enable clock\n");
>> +				goto clk_error;
>> +			}
>> +		} else {
>> +			clk_disable_unprepare(omm->clk_bulk[i + 1].clk);
>> +		}
>> +	}
>> +
>> +	return 0;
>> +
>> +clk_error:
>> +	while (i--)
>> +		clk_disable_unprepare(omm->clk_bulk[i + 1].clk);
>> +
>> +	return ret;
>> +}
>> +
>> +static int stm32_omm_disable_child(struct device *dev)
>> +{
>> +	struct stm32_omm *omm = dev_get_drvdata(dev);
>> +	struct reset_control *reset;
>> +	int ret;
>> +	u8 i;
>> +
>> +	ret = stm32_omm_toggle_child_clock(dev, true);
>> +	if (!ret)
>             ^^^^
> I'm pretty sure this was intended to be if (ret) and the ! is a typo.
> 
>> +		return ret;
> 
> If it's not a typo please write this as:
> 
> 	if (!ret)
> 		return 0;

For the record I consider this a bug report which still needs addressing
by the authors.

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ