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
parent
8916d3cca7
commit
dcee753abe
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue