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:
 <KL1PR06MB696494800980E97A1CBD449E96512@KL1PR06MB6964.apcprd06.prod.outlook.com>
Date: Mon, 19 Feb 2024 23:56:42 +0800
From: Yang Xiwen <forbidden405@...look.com>
To: Simon Horman <horms@...nel.org>
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>,
 Andrew Lunn <andrew@...n.ch>, 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 v2 1/6] net: hisilicon: add support for hisi_femac core on
 Hi3798MV200

On 2/19/2024 11:53 PM, Simon Horman wrote:
> On Fri, Feb 16, 2024 at 06:02:00PM +0800, Yang Xiwen via B4 Relay wrote:
>
> ...
>
>> @@ -826,15 +847,32 @@ static int hisi_femac_drv_probe(struct platform_device *pdev)
>>   						 priv->phy_reset_delays,
>>   						 DELAYS_NUM);
>>   		if (ret)
>> -			goto out_disable_clk;
>> +			goto out_free_netdev;
>>   		hisi_femac_phy_reset(priv);
>>   	}
>>   
>> +	// Register the optional MDIO bus
>> +	for_each_available_child_of_node(node, mdio_np) {
>> +		if (of_node_name_prefix(mdio_np, "mdio")) {
>> +			priv->mdio_pdev = of_platform_device_create(mdio_np, NULL, dev);
>> +			of_node_put(mdio_np);
>> +			if (!priv->mdio_pdev) {
>> +				dev_err(dev, "failed to register MDIO bus device\n");
>> +				goto out_free_netdev;
> Hi Yang Xiwen,
>
> out_free_netdev will return ret.
> However, it seems that ret is uninitialised here.
> Perhaps it should be set to a negative error value?
Oh, you are right. Will fix this in next version.
>
> Flagged by Smatch.
>
>> +			}
>> +			mdio_registered = true;
>> +			break;
>> +		}
>> +	}
>> +
>> +	if (!mdio_registered)
>> +		dev_warn(dev, "MDIO subnode notfound. This is usually a bug.\n");
>> +
>>   	phy = of_phy_get_and_connect(ndev, node, hisi_femac_adjust_link);
>>   	if (!phy) {
>>   		dev_err(dev, "connect to PHY failed!\n");
>>   		ret = -ENODEV;
>> -		goto out_disable_clk;
>> +		goto out_unregister_mdio_bus;
>>   	}
>>   
>>   	phy_attached_print(phy, "phy_id=0x%.8lx, phy_mode=%s\n",
> ...


-- 
Regards,
Yang Xiwen


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ