Re: [PATCH 7/8] firewire: core: detect model name for legacy layout of configuration ROM
Brought to you by:
aeb,
bencollins
From: Takashi S. <o-t...@sa...> - 2023-12-21 13:13:11
|
Hi, On Thu, Dec 21, 2023 at 04:50:08AM -0800, Adam Goldman wrote: > Hi, > > > - ret = fw_csr_string(dir, attr->key, buf, bufsize); > > + for (i = 0; i < ARRAY_SIZE(directories) && !!directories[i]; ++i) { > > + int result = fw_csr_string(directories[i], attr->key, buf, bufsize); > > + // Detected. > > + if (result >= 0) > > + ret = result; > > + } > > > > if (ret >= 0) { > > ret is an automatic variable with no initializer. Unless you initialize > it (to -ENOENT), this is UB. Indeed. The uninitialized value is going to be evaluated. I'll send take 2 patchset later. Thanks Takashi Sakamoto |