OSDN Git Service

gpio: sim: fix uninitialized ret variable
authorTom Rix <trix@redhat.com>
Sat, 18 Dec 2021 15:27:12 +0000 (07:27 -0800)
committerBartosz Golaszewski <brgl@bgdev.pl>
Sun, 19 Dec 2021 13:47:30 +0000 (14:47 +0100)
commitc08995bff202f102c0eff7b799b6b91b748a02a2
treefc373967e87dcbc7e79b06a5a1b7c275d0786455
parent6dbe6c07f94f349098b512d88a1e1c5e2312b13d
gpio: sim: fix uninitialized ret variable

Building with clang returns this error:

gpio-sim.c:889:7: error: variable 'ret' is uninitialized
  when used here

ret should be the status of the call to
gpio_sim_make_bank_swnode stored in bank->swnode.

Fixes: 83960fcf4818 ("gpio: sim: new testing module")
Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
drivers/gpio/gpio-sim.c