1
0
Fork 0

MLK-14275: regulator: pf1550-regulator-rpmsg: clear 'u32 val' before read value by rpmsg

Actually, m4 only fill the least 1byte, so we'd better clear 'val' before
reading by rpmsg, thus the gabage data will not bother us.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
(cherry picked from commit df3428c6588a00fa153a3b6996cc33b21b69efb6)
pull/10/head
Robin Gong 2017-02-27 16:25:00 +08:00 committed by Jason Liu
parent 8916d3cca7
commit dcee753abe
1 changed files with 1 additions and 0 deletions

View File

@ -382,6 +382,7 @@ static ssize_t pf1550_registers_show(struct device *dev,
msg.header.cmd = PF1550_GET_REG;
msg.reg = i;
msg.val = 0;
err = pf1550_send_message(&msg, info);
if (err)