Messages in this thread | | | Date | Mon, 1 Aug 2022 12:17:36 +0300 | From | Dan Carpenter <> | Subject | Re: [PATCH 2/2] staging: r8188eu: convert rtw_set_802_11_add_wep error code semantics |
| |
On Sun, Jul 31, 2022 at 10:12:56AM -0700, Joe Perches wrote: > > I'm happy of course to rewrite this to address any concerns, but > > I was hoping I could clarify what you've said though? Apologies if I've > > missed it, but how is this function now returning 1 on success? It sets > > ret to 0 (success) at the start and then sets it to one of two negative > > error codes depending on what happens. Am I missing something here? > > (Perfectly possible that I am). > > > > In terms of do nothing gotos, do you mean gotos that just set an error > > code then jump to the end? If you'd prefer, as the function just returns > > right after the exit label, I can just return the codes directly and have > > a 'return 0;' like you say above? > > > > Thanks as always for your insight. > > Yes, you've got it right. > > I think Dan is suggesting something like the below, but > not necessarily in a single patch:
I always like your style, Joe.
regards, dan carpenter
| |