misc: lattice-ecp3-config: Remove set but clearly unused variable 'ret'
authorLee Jones <lee.jones@linaro.org>
Wed, 1 Jul 2020 08:58:45 +0000 (09:58 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Jul 2020 13:05:37 +0000 (15:05 +0200)
commit8bc056e84a66e37efda30a3a66db9a27f023d9ba
tree333d60676efcb653d51f63109b81396cf53ab4cb
parent82f5b473d91a7f4e687207fb6d53f7c55669fcd0
misc: lattice-ecp3-config: Remove set but clearly unused variable 'ret'

It's odd for the return value to be assigned to a variable so many
times, but never actually checked, but this has been the case since
the driver's inception in 2012.  If it hasn't caused any issues by
now, it's probably unlikely to.  Let's take it out, at least until
someone finds a reason to start using it.

Fixes the following W=1 kernel build warning:

 drivers/misc/lattice-ecp3-config.c: In function ‘firmware_load’:
 drivers/misc/lattice-ecp3-config.c:70:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
 70 | int ret;
 | ^~~

Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20200701085853.164358-13-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/lattice-ecp3-config.c