mraa.c: Remove mraa_init() from mraa_pin_mode_test
authorMichael Ring <michael.ring@swisscom.com>
Sat, 4 Apr 2015 17:27:44 +0000 (18:27 +0100)
committerBrendan Le Foll <brendan.le.foll@intel.com>
Wed, 8 Apr 2015 21:19:14 +0000 (22:19 +0100)
If platform is not initalised at this stage then there is no need to attempt
again

Signed-off-by: Michael Ring <mail@michael-ring.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
src/mraa.c

index e4f5f74..1dc80ae 100644 (file)
@@ -216,9 +216,7 @@ mraa_boolean_t
 mraa_pin_mode_test(int pin, mraa_pinmodes_t mode)
 {
     if (plat == NULL) {
-        mraa_init();
-        if (plat == NULL)
-            return 0;
+        return 0;
     }
     if (pin > (plat->phy_pin_count - 1) || pin < 0)
         return 0;