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: <20141004.200249.1455277042095588643.davem@davemloft.net>
Date:	Sat, 04 Oct 2014 20:02:49 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	thomas.petazzoni@...e-electrons.com
Cc:	pgynther@...gle.com, netdev@...r.kernel.org, f.fainelli@...il.com
Subject: Re: [PATCH net-next] net: phy: adjust fixed_phy_register() return
 value

From: Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>
Date: Sat, 4 Oct 2014 14:07:31 +0200

> I am not sure this return (!phy || IS_ERR(phy)) is doing the right
> thing. This function is supposed to return an error code on failure, or
> 0 on success. I don't see how your error handling returns an error code
> on failure. What about doing the more explicit:
> 
> 		phy = fixed_phy_register(PHY_POLL, &status, np);
> 		if (IS_ERR(phy))
> 			return PTR_ERR(phy);
> 		else
> 			return 0;
> 
> Or am I missing something?

Agreed, there is no circumstance under which the new fixed_phy_register()
should return a NULL pointer.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ