Commit 6105b2e
gpiolib: Simplify error path in gpiod_get_index() when requesting GPIO
Simplify error path in the gpiod_get_index() when requesting a GPIO line by:
- checking for error condition first
- dropping redundant 'else'
As a result, decrease the indentation level for better readability.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>1 parent 322b86e commit 6105b2e
1 file changed
Lines changed: 12 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3933 | 3933 | | |
3934 | 3934 | | |
3935 | 3935 | | |
3936 | | - | |
3937 | | - | |
3938 | | - | |
3939 | | - | |
3940 | | - | |
3941 | | - | |
3942 | | - | |
3943 | | - | |
3944 | | - | |
3945 | | - | |
3946 | | - | |
3947 | | - | |
| 3936 | + | |
3948 | 3937 | | |
3949 | | - | |
| 3938 | + | |
| 3939 | + | |
| 3940 | + | |
| 3941 | + | |
| 3942 | + | |
| 3943 | + | |
| 3944 | + | |
| 3945 | + | |
| 3946 | + | |
| 3947 | + | |
| 3948 | + | |
3950 | 3949 | | |
3951 | 3950 | | |
3952 | 3951 | | |
| |||
0 commit comments