diff options
| author | Nathan Chancellor <[email protected]> | 2022-05-23 15:05:22 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2022-06-10 13:29:17 +0000 |
| commit | bd476c1306ea989d6d9eb65295572e98d93edeb6 (patch) | |
| tree | a0dbf65e44b6d6f2c1377584b447018e031145d5 /lib/overflow_kunit.c | |
| parent | comedi: vmk80xx: fix expression for tx buffer size (diff) | |
| download | kernel-bd476c1306ea989d6d9eb65295572e98d93edeb6.tar.gz kernel-bd476c1306ea989d6d9eb65295572e98d93edeb6.zip | |
misc: rtsx: Fix clang -Wsometimes-uninitialized in rts5261_init_from_hw()
Clang warns:
drivers/misc/cardreader/rts5261.c:406:13: error: variable 'setting_reg2' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
} else if (efuse_valid == 0) {
^~~~~~~~~~~~~~~~
drivers/misc/cardreader/rts5261.c:412:30: note: uninitialized use occurs here
pci_read_config_dword(pdev, setting_reg2, &lval2);
^~~~~~~~~~~~
efuse_valid == 1 is not a valid value so just return early from the
function to avoid using setting_reg2 uninitialized.
Fixes: b1c5f3085149 ("misc: rtsx: add rts5261 efuse function")
Reported-by: Dan Carpenter <[email protected]>
Reported-by: kernel test robot <[email protected]>
Reported-by: Tom Rix <[email protected]>
Suggested-by: Ricky WU <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Signed-off-by: Nathan Chancellor <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'lib/overflow_kunit.c')
0 files changed, 0 insertions, 0 deletions
