diff --git a/drivers/regulator/lp8788-ldo.c b/drivers/regulator/lp8788-ldo.c index 553b4790050f..2ee22e7ea675 100644 --- a/drivers/regulator/lp8788-ldo.c +++ b/drivers/regulator/lp8788-ldo.c @@ -501,8 +501,12 @@ static int lp8788_config_ldo_enable_mode(struct platform_device *pdev, return 0; } - /* FIXME: check default mode for GPIO here: high or low? */ - ldo->ena_gpiod = devm_gpiod_get_index_optional(&pdev->dev, + /* + * Do not use devm* here: the regulator core takes over the + * lifecycle management of the GPIO descriptor. + * FIXME: check default mode for GPIO here: high or low? + */ + ldo->ena_gpiod = gpiod_get_index_optional(&pdev->dev, "enable", enable_id, GPIOD_OUT_HIGH |