Commit 4ea0c97
gpiolib: Check array_info for NULL only once in gpiod_get_array()
gpiod_get_array() has a long if-else-if branching where each of them
tests for the same variable to be not NULL. Instead, check for NULL
before even going to that flow.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>1 parent 7973642 commit 4ea0c97
1 file changed
Lines changed: 9 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4288 | 4288 | | |
4289 | 4289 | | |
4290 | 4290 | | |
4291 | | - | |
| 4291 | + | |
4292 | 4292 | | |
4293 | 4293 | | |
4294 | 4294 | | |
| |||
4333 | 4333 | | |
4334 | 4334 | | |
4335 | 4335 | | |
| 4336 | + | |
| 4337 | + | |
| 4338 | + | |
| 4339 | + | |
| 4340 | + | |
4336 | 4341 | | |
4337 | | - | |
| 4342 | + | |
4338 | 4343 | | |
4339 | 4344 | | |
4340 | 4345 | | |
4341 | 4346 | | |
4342 | 4347 | | |
4343 | 4348 | | |
4344 | 4349 | | |
4345 | | - | |
4346 | | - | |
| 4350 | + | |
4347 | 4351 | | |
4348 | 4352 | | |
4349 | 4353 | | |
| |||
4357 | 4361 | | |
4358 | 4362 | | |
4359 | 4363 | | |
4360 | | - | |
| 4364 | + | |
4361 | 4365 | | |
4362 | 4366 | | |
4363 | 4367 | | |
| |||
4368 | 4372 | | |
4369 | 4373 | | |
4370 | 4374 | | |
4371 | | - | |
4372 | | - | |
4373 | 4375 | | |
4374 | 4376 | | |
4375 | 4377 | | |
| |||
0 commit comments