[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZYAZPRt79Qa1YPS0@iguana.lan>
Date: Mon, 18 Dec 2023 02:04:52 -0800
From: Adam Goldman <adamg@...ox.com>
To: Takashi Sakamoto <o-takashi@...amocchi.jp>
Cc: linux1394-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 7/8] firewire: core: detect model name for legacy
layout of configuration ROM
Hi,
On Sun, Dec 17, 2023 at 07:30:10PM +0900, Takashi Sakamoto wrote:
> - ret = fw_csr_string(dir, attr->key, buf, bufsize);
> + for (i = 0; i < ARRAY_SIZE(directories) && directories[i]; ++i)
> + ret = fw_csr_string(directories[i], attr->key, buf, bufsize);
I believe this is incorrect. If the attribute is in the first directory
searched, the loop will continue. The second loop iteration will set ret
to -ENOENT because the attribute isn't in the second directory. Then
show_text_leaf will return -ENOENT even though the attribute existed.
-- Adam
Powered by blists - more mailing lists