Private
Public Access
2
0

mraa.c: Remove mraa_init() from mraa_pin_mode_test

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>
This commit is contained in:
Michael Ring
2015-04-04 18:27:44 +01:00
committed by Brendan Le Foll
parent 56ba08a98f
commit 095ff894a7

View 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;