[PATCH 5.19 052/207] gpio: mockup: Fix potential resource leakage when register a chip