summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/ge/common/vpd_reader.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/board/ge/common/vpd_reader.c b/board/ge/common/vpd_reader.c
index 2422db38013..b3f9e96615d 100644
--- a/board/ge/common/vpd_reader.c
+++ b/board/ge/common/vpd_reader.c
@@ -66,7 +66,7 @@ static int verify_bch(int ecc_bits, unsigned int prim_poly, u8 *data,
return -1;
}
- unsigned int *errloc = (unsigned int *)calloc(data_length,
+ unsigned int *errloc = (unsigned int *)calloc(ecc_bits,
sizeof(unsigned int));
int errors = decode_bch(bch, data, data_length, ecc, NULL, NULL,
errloc);