[PATCH] gpiolib: gpio_request: correct return code of a already requested gpio

Silvio Fricke silvio.fricke at gmail.com
Tue Sep 16 05:15:11 PDT 2014


Signed-off-by: Silvio Fricke <silvio.fricke at gmail.com>
---
 drivers/gpio/gpiolib.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 611e41e..3370438 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -55,10 +55,8 @@ int gpio_request(unsigned gpio, const char *label)
 		goto done;
 	}
 
-	if (gi->requested) {
-		ret = -EBUSY;
-		goto done;
-	}
+	if (gi->requested)
+		return 0;
 
 	ret = 0;
 
-- 
2.1.0




More information about the barebox mailing list