Private
Public Access
2
0

pinmap: test mode, add uninitialised protection.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Thomas Ingleby
2014-05-07 16:07:58 +01:00
committed by Brendan Le Foll
parent 83a5e6cde8
commit 0986b5aa92

View File

@@ -220,6 +220,11 @@ maa_result_print(maa_result_t result)
maa_boolean_t
maa_pin_mode_test(int pin, maa_pinmodes_t mode)
{
if (plat == NULL) {
maa_init();
if (plat == NULL)
return 0;
}
if (pin > plat->phy_pin_count || pin < 0)
return 0;