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: <c00dad08-00f5-41f0-861c-cb40593b49fd@lunn.ch>
Date: Fri, 16 Feb 2024 00:57:43 +0100
From: Andrew Lunn <andrew@...n.ch>
To: forbidden405@...look.com
Cc: Yisen Zhuang <yisen.zhuang@...wei.com>,
	Salil Mehta <salil.mehta@...wei.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Rob Herring <robh+dt@...nel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Yang Xiwen <forbidden405@...mail.com>,
	Heiner Kallweit <hkallweit1@...il.com>,
	Russell King <linux@...linux.org.uk>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH 1/6] net: hisilicon: add support for hisi_femac core on
 Hi3798MV200

> +	for (i = 0; i < CLK_NUM; i++) {
> +		priv->clks[i] = devm_clk_get_enabled(&pdev->dev, clk_strs[i]);
> +		if (IS_ERR(priv->clks[i])) {
> +			dev_err(dev, "failed to get enabled clk %s: %ld\n", clk_strs[i],
> +				PTR_ERR(priv->clks[i]));
> +			ret = -ENODEV;
> +			goto out_free_netdev;
> +		}

The clk API has devm_clk_bulk_ versions. Please take a look at them, and see
if it will simplify the code.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ