Messages in this thread | | | Date | Tue, 8 Aug 2023 14:55:25 -0700 | From | Jakub Kicinski <> | Subject | Re: [PATCH net-next v4 1/2] netconsole: Create a allocation helper |
| |
On Fri, 4 Aug 2023 05:43:20 -0700 Breno Leitao wrote: > + struct netconsole_target *nt = alloc_and_init(); > + int err = -ENOMEM; > + > + if (!nt) > + goto fail;
No complex code in the variable init, please. Makes the code harder to read.
struct netconsole_target *nt; int err;
nt = alloc_and_init(); if (!nt) { err = -ENOMEM; goto fail; } -- pw-bot: cr
| |