gpio: eliminate file descriptor leak 30/262830/1
authorAdrian Szyndela <adrian.s@samsung.com>
Fri, 20 Aug 2021 08:34:29 +0000 (10:34 +0200)
committerAdrian Szyndela <adrian.s@samsung.com>
Fri, 20 Aug 2021 08:41:58 +0000 (10:41 +0200)
commit384570f9fd06137c2ec6ea02928bc886c7d03dc4
tree5df15f3f8568ecdf72b246401ea9db76234bf7bc
parent3d2317001200be4f02d62533109e1a1a187756cc
gpio: eliminate file descriptor leak

Once in the loop, fd_chip can be left unclosed if configuration file
does not match the system and next iteration is required.

This commit makes fd_chip closed just at the end of the current iteration,
before entering another iteration.

Change-Id: I8d7102ba01d0ca30d63e5b634199792368a98297
src/peripheral_gpio_modern_api.c