lkml.org 
[lkml]   [2022]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] leds: leds-wm831x-status: init chip_pdata before access
From
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@linuxfoundation.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

\
 
 \ /
  Last update: 2022-11-22 23:41    [W:0.044 / U:1.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site