Thread (10 messages) 10 messages, 6 authors, 2024-10-08

Re: [PATCH net] net: ethernet: adi: adin1110: Fix some error handling path in adin1110_read_fifo()

From: Simon Horman <horms@kernel.org>
Date: 2024-10-07 15:46:04
Also in: kernel-janitors, lkml

On Fri, Oct 04, 2024 at 11:09:52AM -0700, Jakub Kicinski wrote:
On Fri, 4 Oct 2024 14:47:22 +0300 Dan Carpenter wrote:
quoted
It's a pity that deliberately doing a "return ret;" when ret is zero is so
common.  Someone explained to me that it was "done deliberately to express that
we were propagating the success from frob_whatever()".  No no no!
FWIW I pitched to Linus that we should have a err_t of some sort for
int variables which must never be returned with value of 0.
He wasn't impressed, but I still think it would be useful :)
FWIIW, I think something like that would be quite nice.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help