Re: [PATCH] accel/qaic: initialize ret variable to 0

2023-04-18 Thread Jeffrey Hugo
On 4/18/2023 2:48 PM, Nick Desaulniers wrote: On Tue, Apr 18, 2023 at 1:46 PM Jeffrey Hugo wrote: On 4/18/2023 1:20 PM, Tom Rix wrote: clang static analysis reports drivers/accel/qaic/qaic_data.c:610:2: warning: Undefined or garbage value returned to caller

Re: [PATCH] accel/qaic: initialize ret variable to 0

2023-04-18 Thread Nick Desaulniers
On Tue, Apr 18, 2023 at 1:46 PM Jeffrey Hugo wrote: > > On 4/18/2023 1:20 PM, Tom Rix wrote: > > clang static analysis reports > > drivers/accel/qaic/qaic_data.c:610:2: warning: Undefined or garbage > >value returned to caller [core.uninitialized.UndefReturn] > > return ret; > >

Re: [PATCH] accel/qaic: initialize ret variable to 0

2023-04-18 Thread Jeffrey Hugo
On 4/18/2023 1:20 PM, Tom Rix wrote: clang static analysis reports drivers/accel/qaic/qaic_data.c:610:2: warning: Undefined or garbage value returned to caller [core.uninitialized.UndefReturn] return ret; ^~ The ret variable is only set some of the time but is

[PATCH] accel/qaic: initialize ret variable to 0

2023-04-18 Thread Tom Rix
clang static analysis reports drivers/accel/qaic/qaic_data.c:610:2: warning: Undefined or garbage value returned to caller [core.uninitialized.UndefReturn] return ret; ^~ The ret variable is only set some of the time but is always returned. So initialize ret to 0.