summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>2026-03-06 18:22:49 +0100
committerPhilipp Zabel <p.zabel@pengutronix.de>2026-03-09 10:20:03 +0100
commit20adbf3b8f5c5787da29f8cdd7cfc4fa87854bd5 (patch)
tree40e2bca1e03a7efcf9d8abef0cae6def964c0d9c
parent1acd4663840849d3371ab8734b55cd184a2a5c5b (diff)
downloadlinux-next-20adbf3b8f5c5787da29f8cdd7cfc4fa87854bd5.tar.gz
linux-next-20adbf3b8f5c5787da29f8cdd7cfc4fa87854bd5.zip
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 <p.zabel@pengutronix.de> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
-rw-r--r--drivers/reset/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/reset/core.c b/drivers/reset/core.c
index 954df36a242e..3fa0d49eb494 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,