Thread (4 messages) 4 messages, 2 authors, 2015-04-01

Re: [PATCH v2] net: phy: at803x: simplify using devm_gpiod_get_optional and its 4th argument

From: David Miller <davem@davemloft.net>
Date: 2015-03-31 23:28:40

From: Uwe Kleine-König <redacted>
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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help