[PATCH linux dev-4.7] drivers: fsi: scom: Zero out user buffer first
Christopher Bostic
cbostic at linux.vnet.ibm.com
Wed Feb 22 14:28:08 AEDT 2017
On 2/21/17 11:02 AM, Eddie James wrote:
> From: "Edward A. James" <eajames at us.ibm.com>
>
> Scom data is just bit-wise OR'd with the user buffer, so it needs to be
> set to 0 first.
>
> Signed-off-by: Edward A. James <eajames at us.ibm.com>
> ---
> drivers/fsi/fsi-scom.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/fsi/fsi-scom.c b/drivers/fsi/fsi-scom.c
> index 51b3dc3..ed3b98e 100644
> --- a/drivers/fsi/fsi-scom.c
> +++ b/drivers/fsi/fsi-scom.c
> @@ -85,6 +85,7 @@ static int get_scom(struct scom_device *scom_dev, uint64_t *value,
> uint32_t result, data;
> int rc;
>
> + *value = 0ULL;
> data = addr;
> rc = fsi_device_write(scom_dev->fsi_dev, SCOM_CMD_REG, &data,
> sizeof(uint32_t));
Reviewed-by: Christopher Bostic <cbostic at linux.vnet.ibm.com>
More information about the openbmc
mailing list