[PATCH 5.15 044/148] gpio: mockup: Fix potential resource leakage when register a chip