[PATCH 6.1 202/215] gpio: fix resource unwinding order in error path