diff options
author | Tom Rix <[email protected]> | 2023-05-17 10:56:05 -0600 |
---|---|---|
committer | Jeffrey Hugo <[email protected]> | 2023-05-23 09:43:11 -0600 |
commit | 0e163e54c34c12369ccf6562e74e8f0a800f4aad (patch) | |
tree | daca5f8f411b70dabc257f94f1624721c0a15890 /drivers/fpga/fpga-mgr.c | |
parent | c21f11d182c2180d8b90eaff84f574cfa845b250 (diff) |
accel/qaic: initialize ret variable to 0
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;
^~~~~~~~~~
From a code analysis of the function, the ret variable is only set some
of the time but is always returned. This suggests ret can return
uninitialized garbage. However BO allocation will ensure ret is always
set in reality.
Initialize ret to 0 to silence the warning.
Fixes: ff13be830333 ("accel/qaic: Add datapath")
Signed-off-by: Tom Rix <[email protected]>
[jhugo: Reword commit text]
Signed-off-by: Jeffrey Hugo <[email protected]>
Reviewed-by: Carl Vanderlip <[email protected]>
Reviewed-by: Pranjal Ramajor Asha Kanojiya <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/fpga/fpga-mgr.c')
0 files changed, 0 insertions, 0 deletions