Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i3c: phytium: initialize variable 'ret' when !master->prescl0
Fix follow error with clang-19: drivers/i3c/master/i3c-master-phytium.c:1710:7: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] 1710 | if (!master->prescl0) | ^~~~~~~~~~~~~~~~ drivers/i3c/master/i3c-master-phytium.c:1788:9: note: uninitialized use occurs here 1788 | return ret; | ^~~ drivers/i3c/master/i3c-master-phytium.c:1710:3: note: remove the 'if' if its condition is always false 1710 | if (!master->prescl0) | ^~~~~~~~~~~~~~~~~~~~~ 1711 | goto err_disable_sysclk; | ~~~~~~~~~~~~~~~~~~~~~~~ drivers/i3c/master/i3c-master-phytium.c:1669:9: note: initialize the variable 'ret' to silence this warning 1669 | int ret, irq; | ^ | = 0 1 error generated. Signed-off-by: WangYuli <[email protected]>
- Loading branch information