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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 31 Mar 2015 19:28:38 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	u.kleine-koenig@...gutronix.de
Cc:	f.fainelli@...il.com, netdev@...r.kernel.org,
	linus.walleij@...aro.org, acourbot@...dia.com,
	kernel@...gutronix.de
Subject: Re: [PATCH v2] net: phy: at803x: simplify using
 devm_gpiod_get_optional and its 4th argument

From: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
Date: Tue, 31 Mar 2015 22:08:45 +0200

> I still think assigning directly to priv->gpiod_reset would fine
> because having the priv->gpiod_reset NULL is neither more nor less
> right that ERR_PTR(-ESOMETHING).

You really want to push my buttons don't you? :-/

What if someone adds a new resource allocation after this thing and
then adds an unwind path where something has to be done to the GPIOD
as part of cleanup?

What does your error pointer cause to happen to an unsuspecting person
creating such a change?

Why isn't this obvious to you as a good coding practice that is
future proof against any changes to this code?

--
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