platform/x86: int3472: Avoid crash in unregistering regulator gpio
When int3472 is loaded before GPIO driver, acpi_get_and_request_gpiod() failed but the returned gpio descriptor is not NULL, it will cause panic in later gpiod_put(), so set the gpio_desc to NULL in register error handling to avoid such crash. Signed-off-by: Hao Yao <hao.yao@intel.com> Signed-off-by: Bingbu Cao <bingbu.cao@intel.com> Link: https://lore.kernel.org/r/20230524035135.90315-1-bingbu.cao@intel.comReviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Showing
Please register or sign in to comment