Skip to content

Commit

Permalink
hdat/i2c: Fix array version check
Browse files Browse the repository at this point in the history
We should be checking the array version, not the HDIF header version.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
oohal authored and stewartsmith committed Jul 25, 2017
1 parent 6430a7e commit ce2153b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hdata/i2c.c
Expand Up @@ -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) {
Expand Down

0 comments on commit ce2153b

Please sign in to comment.