lkml.org 
[lkml]   [2021]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] staging: r8188eu: Remove unnecessary ret variable in rtw_drv_init()
To be honest, I prefered the original.

foo = alloc();
if (!foo) {
ret = -EWHATEVER;
goto free_last_thing;
}

I like this style of error handling because all the information is
there. You don't need to scroll down.

I don't really care about this specific patch at all. It's a small
thing. But we had someone come through who was sort of obsessed with
removing these sorts of variables. Just because you can remove a
variable doesn't necessarily make the code more readable.

If you're doing the work and maintaining the driver you get to choose
your own style to some extent. But I don't want to encourage people to
start sending these sort of patches more generally.

regards,
dan carpenter

\
 
 \ /
  Last update: 2021-08-16 11:07    [W:2.660 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site