From: Bartosz Golaszewski Date: Fri, 6 Mar 2026 17:22:49 +0000 (+0100) Subject: reset: warn on reset-gpio release X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20adbf3b8f5c5787da29f8cdd7cfc4fa87854bd5;p=thirdparty%2Fkernel%2Flinux.git reset: warn on reset-gpio release While we implement an empty .release() callback for reset-gpio (driver core requires it), this function will never actually be called as nobody ever removes the device and the last reference is not dropped anywhere. This is by design - once created, the reset-gpio device stays in memory. Make the .release() callback emit a warning, should it ever be called due to a programming bug. Reviewed-by: Philipp Zabel Signed-off-by: Bartosz Golaszewski Signed-off-by: Philipp Zabel --- diff --git a/drivers/reset/core.c b/drivers/reset/core.c index 954df36a242e8..3fa0d49eb4940 100644 --- a/drivers/reset/core.c +++ b/drivers/reset/core.c @@ -820,7 +820,7 @@ static void __reset_control_put_internal(struct reset_control *rstc) static void reset_gpio_aux_device_release(struct device *dev) { - + WARN(1, "reset-gpio device %s should never have been removed", dev_name(dev)); } static int reset_create_gpio_aux_device(struct reset_gpio_lookup *rgpio_dev,