[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a77c38d1-1633-5421-6fab-6886b642fe66@linuxfoundation.org>
Date: Tue, 22 Nov 2022 15:39:35 -0700
From: Shuah Khan <skhan@...uxfoundation.org>
To: Pavel Machek <pavel@....cz>
Cc: patches@...nsource.cirrus.com, linux-leds@...r.kernel.org,
linux-kernel@...r.kernel.org,
Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH] leds: leds-wm831x-status: init chip_pdata before access
On 11/22/22 14:05, Pavel Machek wrote:
> Hi!
>
>> wm831x_status_probe() accesses status from chip_pdata before
>> initializing it. Fix it.
>>
>> Signed-off-by: Shuah Khan <skhan@...uxfoundation.org>
>
> Does it? ARRAY_SIZE() will be compile-time constant, no?
>
> What is the bug? Did you test the code?
>
Is ARRAY_SIZE() safe when accessing the status chip_pdata->status?
I wasn't sure. If so, this change isn't necessary.
thanks,
-- Shuah
Powered by blists - more mailing lists