[PATCH] Input: ps2-gpio - actually abort probe when connected to sleeping GPIOs

Subsystems: input (keyboard, mouse, joystick, touchscreen) drivers, the rest

STALE3215d

2 messages, 2 authors, 2017-10-24 · open the first message on its own page

[PATCH] Input: ps2-gpio - actually abort probe when connected to sleeping GPIOs

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2017-10-23 23:45:01

We've been missing a goto to the unwind path...

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/input/serio/ps2-gpio.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/input/serio/ps2-gpio.c b/drivers/input/serio/ps2-gpio.c
index b50e3817f3c4..c62cceb97bb1 100644
--- a/drivers/input/serio/ps2-gpio.c
+++ b/drivers/input/serio/ps2-gpio.c
@@ -366,6 +366,7 @@ static int ps2_gpio_probe(struct platform_device *pdev)
 	    gpiod_cansleep(drvdata->gpio_clk)) {
 		dev_err(dev, "GPIO data or clk are connected via slow bus\n");
 		error = -EINVAL;
+		goto err_free_serio;
 	}
 
 	drvdata->irq = platform_get_irq(pdev, 0);
-- 
2.15.0.rc0.271.g36b669edcc-goog


-- 
Dmitry

Re: [PATCH] Input: ps2-gpio - actually abort probe when connected to sleeping GPIOs

From: Danilo Krummrich <hidden>
Date: 2017-10-24 07:15:20

On 2017-10-24 01:44, Dmitry Torokhov wrote:
quoted hunk
We've been missing a goto to the unwind path...

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/input/serio/ps2-gpio.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/input/serio/ps2-gpio.c 
b/drivers/input/serio/ps2-gpio.c
index b50e3817f3c4..c62cceb97bb1 100644
--- a/drivers/input/serio/ps2-gpio.c
+++ b/drivers/input/serio/ps2-gpio.c
@@ -366,6 +366,7 @@ static int ps2_gpio_probe(struct platform_device 
*pdev)
 	    gpiod_cansleep(drvdata->gpio_clk)) {
 		dev_err(dev, "GPIO data or clk are connected via slow bus\n");
 		error = -EINVAL;
+		goto err_free_serio;
Good catch, thanks.
 	}

 	drvdata->irq = platform_get_irq(pdev, 0);
--
2.15.0.rc0.271.g36b669edcc-goog
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help