Thread (59 messages) 59 messages, 9 authors, 2014-12-20

Re: [PATCH v2 0/6] net-PPP: Deletion of a few unnecessary checks

From: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Date: 2014-12-20 15:48:19
Also in: kernel-janitors, lkml

Hi Markus,

On 20.12.2014 15:45, SF Markus Elfring wrote:
quoted
I'm saying to leave the code alone.
Do I need to try another interpretation out for your feedback?

quoted
If it goes:

	var = foo_that_returns_ptr_err()
	if (IS_ERR(var))
		return PTR_ERR(var);

	p->bar = var;

or whatever, simply keep it that way!
Do you want to express here that a data structure member should
only be set after a previous function call succeeded?
I think what David said was pretty clear: If you see code like the above
there is no need to refactor it. That does not mean that this is the
_preferred_ way of error handling. Its just good enough to be left alone.

Regards,
Lino
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help