[Skiboot] [PATCH] hdat/i2c: Fix array version check
Oliver O'Halloran
oohall at gmail.com
Thu Jul 20 12:13:03 AEST 2017
We should be checking the array version, not the HDIF header version.
Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
---
hdata/i2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hdata/i2c.c b/hdata/i2c.c
index 62933e65b7a5..1c26e2ea9df0 100644
--- a/hdata/i2c.c
+++ b/hdata/i2c.c
@@ -190,7 +190,7 @@ int parse_i2c_devs(const struct HDIF_common_hdr *hdr, int idata_index,
version = 1;
prerror("I2C: HDAT device array has no version! Assuming v1\n");
} else {
- version = be32_to_cpu(hdr->version);
+ version = be32_to_cpu(ahdr->version);
}
if (version != 1) {
--
2.9.4
More information about the Skiboot
mailing list