fpga: stratix10-soc: Do not use ret uninitialized in s10_probe()
authorNathan Chancellor <nathan@kernel.org>
Tue, 30 Nov 2021 22:11:24 +0000 (15:11 -0700)
committerMoritz Fischer <mdf@kernel.org>
Fri, 3 Dec 2021 04:07:17 +0000 (20:07 -0800)
commitea59fc1beff1358966b213b4df89aca3f7dec157
treef95f0bade9f69225bfa590890658cd53d6b2ae4c
parent8886a579744fbfa53e69aa453ed10ae3b1f9abac
fpga: stratix10-soc: Do not use ret uninitialized in s10_probe()

Clang warns:

drivers/fpga/stratix10-soc.c:431:9: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
        return ret;
               ^~~

ret is only assigned in an error path now so just return 0 directly.

Fixes: 4ba0b2c294fe ("fpga: mgr: Use standard dev_release for class driver")
Link: https://github.com/ClangBuiltLinux/linux/issues/1517
Reviewed-by: Russ Weight <russell.h.weight@intel.com>
Reviewed-by: Tom Rix <trix@redhat.com>
Acked-by: Xu Yilun <yilun.xu@intel.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Moritz Fischer <mdf@kernel.org>
drivers/fpga/stratix10-soc.c