mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
gpio: zynqmp: Handle error from get_gpio_modepin
There is a unused variable ret, due to which we are getting sparse warning as below. warning: variable 'ret' set but not used [-Wunused-but-set-variable]. Return ret incase of error. Signed-off-by: Algapally Santosh Sagar <santoshsagar.algapally@amd.com> Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com> Link: https://lore.kernel.org/r/20230120053617.32463-3-ashok.reddy.soma@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
This commit is contained in:
parent
fb737f1ed8
commit
508e1aa58c
1 changed files with 3 additions and 0 deletions
|
@ -48,6 +48,9 @@ static int modepin_gpio_set_value(struct udevice *dev, unsigned int offset,
|
|||
int ret;
|
||||
|
||||
ret = get_gpio_modepin(ret_payload);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (value)
|
||||
out_val = OUTVAL(offset) | ret_payload[1];
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue