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: <a47b567d-96a6-4a87-9f60-33a311c281ae@denx.de>
Date: Fri, 13 Dec 2024 12:45:19 +0100
From: Marek Vasut <marex@...x.de>
To: Mingwei Zheng <zmw12306@...il.com>, antonio.borneo@...s.st.com
Cc: linus.walleij@...aro.org, mcoquelin.stm32@...il.com,
 alexandre.torgue@...s.st.com, make24@...as.ac.cn, peng.fan@....com,
 fabien.dessenne@...s.st.com, linux-gpio@...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 v4] pinctrl: stm32: Add check for clk_enable()

On 12/13/24 2:09 AM, Mingwei Zheng wrote:

[...]

> @@ -1397,7 +1397,7 @@ static int stm32_gpiolib_register_bank(struct stm32_pinctrl *pctl, struct fwnode
>   	return 0;
>   
>   err_clk:
> -	clk_disable_unprepare(bank->clk);
> +	clk_disable_unprepare(pctl->clks[pctl->nbanks].clk);


Should this be

-clk_disable_unprepare(pctl->clks[pctl->nbanks].clk);
+clk_disable_unprepare(pctl->clks[bank->bank_nr].clk);
                                   ^^^^^^^^^^^^^

?

>   	return err;
>   }
>   
> @@ -1617,10 +1617,18 @@ int stm32_pctl_probe(struct platform_device *pdev)
>   		return -EINVAL;
>   	}
>   	pctl->banks = devm_kcalloc(dev, banks, sizeof(*pctl->banks),
> -			GFP_KERNEL);
> +				   GFP_KERNEL);
>   	if (!pctl->banks)
>   		return -ENOMEM;
>   
> +	pctl->clks = devm_kcalloc(dev, banks, sizeof(*pctl->clks),
> +				  GFP_KERNEL);
> +	if (!pctl->clks)
> +		return -ENOMEM;
> +
> +	for (i = 0; i < banks; ++i)

i++

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ