On Thu, Feb 02, 2017 at 09:27:18AM -0500, John W. Linville wrote: > > - regbuf = vzalloc(reglen); > > - if (reglen && !regbuf) > > - return -ENOMEM; > > + regbuf = NULL; > > Any reason to prefer this over changing the declaration to include > the assignment? > > void *regbuf = NULL;
I've chosen this form to have initialization near the vzalloc() call, after sanity checks, however I don't think it's better or worse over declaration initialization. Stanislaw
