History

gpio: winbond: Fix error code in winbond_gpio_get()

This error path returns 1, but it should instead propagate the negative error code from winbond_sio_enter().

Dan Carpenter committed 4 years ago

Commit 9ca766e1 parent a01a40e1 file · +4 −3Browse files

Unified · Split

drivers/gpio/gpio-winbond.c+4−3
@@ -385,12 +385,13 @@ static int winbond_gpio_get(struct gpio_chip *gc, unsigned int offset) · 384 unmodified lines
385385 unsigned long *base = gpiochip_get_data(gc);
386386 const struct winbond_gpio_info *info;
387387 bool val;
388+ int ret;
388389
389390 winbond_gpio_get_info(&offset, &info);
390391
391− val = winbond_sio_enter(*base);
392− if (val)
393− return val;
392+ ret = winbond_sio_enter(*base);
393+ if (ret)
394+ return ret;
394395
395396 winbond_sio_select_logical(*base, info->dev);
396397

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t