p938x_charger: change the length of memcpy in fod_store

change the length of memcpy in fod_store

Change-Id: Ibdcedf3ae2afd1e12548a1916e69a49f67de9977
Signed-off-by: xuwt2 <xuwt2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1479581
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
xuwt2 2020-01-06 14:44:34 +08:00 • committed by Ryan Lattrel
commit 0329269ee2

View file

@ -1650,7 +1650,7 @@ static int fod_store(struct p938x_charger *chip, const char *buf,
}
if (sum > 0 && sum <= FOD_MAX_LEN) {
memcpy(fod_array, fod_array_temp, sizeof(sum));
memcpy(fod_array, fod_array_temp, sum);
*fod_array_len = sum;
p938x_program_fod(chip, fod_array, *fod_array_len);
}