summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/remoteproc
diff options
context:
space:
mode:
authorNathan Chancellor <nathan@kernel.org>2023-10-12 20:04:01 +0300
committerMathieu Poirier <mathieu.poirier@linaro.org>2023-10-16 20:24:34 +0300
commit3d8a18697ad834436d088d65cc66165947cfe600 (patch)
treee2690a4d81821dcc6dc24e241174796e413d85bb /Documentation/devicetree/bindings/remoteproc
parent5c77ebcd05acf3789949c8a387df72381d949ca2 (diff)
downloadlinux-3d8a18697ad834436d088d65cc66165947cfe600.tar.xz
remoteproc: st: Fix sometimes uninitialized ret in st_rproc_probe()
Clang warns (or errors with CONFIG_WERROR=y): drivers/remoteproc/st_remoteproc.c:357:6: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] 357 | if (!ddata->config) | ^~~~~~~~~~~~~~ drivers/remoteproc/st_remoteproc.c:442:9: note: uninitialized use occurs here 442 | return ret; | ^~~ drivers/remoteproc/st_remoteproc.c:357:2: note: remove the 'if' if its condition is always false 357 | if (!ddata->config) | ^~~~~~~~~~~~~~~~~~~ 358 | goto free_rproc; | ~~~~~~~~~~~~~~~ drivers/remoteproc/st_remoteproc.c:348:9: note: initialize the variable 'ret' to silence this warning 348 | int ret, i; | ^ | = 0 1 error generated. Set ret to -ENODEV, which seems to be a standard return code when device_get_match_data() returns NULL. Closes: https://github.com/ClangBuiltLinux/linux/issues/1944 Fixes: 5c77ebcd05ac ("remoteproc: st: Use device_get_match_data()") Signed-off-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Link: https://lore.kernel.org/r/20231012-st_remoteproc-fix-sometimes-uninit-v1-1-f64d0f2d5b37@kernel.org Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Diffstat (limited to 'Documentation/devicetree/bindings/remoteproc')
0 files changed, 0 insertions, 0 deletions