[PATCH] regulator: lp8788-buck: fix copy and paste bug in lp8788_dvs_gpio_request()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"gpio2" as intended here, not "gpio1".

Fixes: 95daa868f22b ("regulator: lp8788-buck: Fully convert to GPIO descriptors")
Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
---
 drivers/regulator/lp8788-buck.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/regulator/lp8788-buck.c b/drivers/regulator/lp8788-buck.c
index 712eaa6ff8ab..2ade249ab6df 100644
--- a/drivers/regulator/lp8788-buck.c
+++ b/drivers/regulator/lp8788-buck.c
@@ -430,9 +430,9 @@ static int lp8788_dvs_gpio_request(struct platform_device *pdev,
 		gpiod_set_consumer_name(buck->gpio1, "LP8788_B2_DVS1");
 
 		buck->gpio2 = devm_gpiod_get_index(dev, "dvs", 1, GPIOD_OUT_LOW);
-		if (IS_ERR(buck->gpio1))
-			return PTR_ERR(buck->gpio1);
-		gpiod_set_consumer_name(buck->gpio1, "LP8788_B2_DVS2");
+		if (IS_ERR(buck->gpio2))
+			return PTR_ERR(buck->gpio2);
+		gpiod_set_consumer_name(buck->gpio2, "LP8788_B2_DVS2");
 
 		buck->dvs = pdata->buck2_dvs;
 		break;
-- 
2.43.0





[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux