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
385 unsigned long *base = gpiochip_get_data(gc);385 unsigned long *base = gpiochip_get_data(gc);
386 const struct winbond_gpio_info *info;386 const struct winbond_gpio_info *info;
387 bool val;387 bool val;
388 int ret;
388 389
389 winbond_gpio_get_info(&offset, &info);390 winbond_gpio_get_info(&offset, &info);
390 391
391 val = winbond_sio_enter(*base);392 ret = winbond_sio_enter(*base);
392 if (val)393 if (ret)
393 return val;394 return ret;
394 395
395 winbond_sio_select_logical(*base, info->dev);396 winbond_sio_select_logical(*base, info->dev);
396 397

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