]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
staging: gpib: fmh: Drop residue from fmh_gpid_fifo_read_countable()
authorNathan Chancellor <nathan@kernel.org>
Tue, 15 Oct 2024 20:09:02 +0000 (13:09 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Oct 2024 07:58:56 +0000 (09:58 +0200)
commitbe11b268e58d35ee394f6caf4056fa82f032eb65
treec7a1e3a2181f1e771f42dd49b02828fa38285109
parent22a3703af127e897dc7df89372b85bb9dc331c5f
staging: gpib: fmh: Drop residue from fmh_gpid_fifo_read_countable()

Clang warns (or errors with CONFIG_WERROR=y):

  drivers/staging/gpib/fmh_gpib/fmh_gpib.c:970:43: error: variable 'residue' is uninitialized when used here [-Werror,-Wuninitialized]
    970 |                                 (int)(*bytes_read), (int)length, (int)residue);
        |                                                                       ^~~~~~~

residue is never initialized in this function and it is not used outside
of an error print. Just remove it altogether, as it is likely not
necessary in this function, as this same exact statement in present in
fmh_gpib_dma_read().

Fixes: 8e4841a0888c ("staging: gpib: Add Frank Mori Hess FPGA PCI GPIB driver")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20241015-staging-gpib-fmh-fix-residue-used-uninitialized-v1-1-23ef05b099da@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gpib/fmh_gpib/fmh_gpib.c