mirror of
https://github.com/torvalds/linux.git
synced 2026-12-03 20:06:35 +00:00
'struct scmi_imx_misc_ctrl_set_in' has a zero length array in the end,
The sizeof will not count 'value[]', and hence Tx size will be smaller
than actual size for Tx,and SCMI firmware will flag this as protocol
error.
Fix this by enlarge the Tx size with 'num * sizeof(__le32)' to count in
the size of data.
Fixes: 61c9f03e22 ("firmware: arm_scmi: Add initial support for i.MX MISC protocol")
Reviewed-by: Jacky Bai <[email protected]>
Tested-by: Shengjiu Wang <[email protected]>
Acked-by: Jason Liu <[email protected]>
Signed-off-by: Peng Fan <[email protected]>
Message-Id: <[email protected]>
(sudeep.holla: Commit rewording and replace hardcoded sizeof(__le32) value)
Signed-off-by: Sudeep Holla <[email protected]>