[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251221181829.64fcdf70@jic23-huawei>
Date: Sun, 21 Dec 2025 18:18:29 +0000
From: Jonathan Cameron <jic23@...nel.org>
To: Petre Rodan <petre.rodan@...dimension.ro>
Cc: David Lechner <dlechner@...libre.com>, Nuno Sá
<nuno.sa@...log.com>, Andy Shevchenko <andy@...nel.org>, Andreas Klinger
<ak@...klinger.de>, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org, Jonathan Cameron
<Jonathan.Cameron@...wei.com>
Subject: Re: [PATCH 05/14] iio: pressure: mprls0025pa: zero out spi_transfer
struct
On Thu, 18 Dec 2025 13:05:47 +0200
Petre Rodan <petre.rodan@...dimension.ro> wrote:
> Make sure that the spi_transfer struct is zeroed out before use.
>
> Signed-off-by: Petre Rodan <petre.rodan@...dimension.ro>
Hi Petre
Good catch.
Smells like a bug to me. Probably want to drag this to the start of the
patch set and add an appropriate fixes tag.
Thanks,
Jonathan
> ---
> drivers/iio/pressure/mprls0025pa_spi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/pressure/mprls0025pa_spi.c b/drivers/iio/pressure/mprls0025pa_spi.c
> index 021c0ed812c0..73f0714f66ca 100644
> --- a/drivers/iio/pressure/mprls0025pa_spi.c
> +++ b/drivers/iio/pressure/mprls0025pa_spi.c
> @@ -21,7 +21,7 @@
> static int mpr_spi_xfer(struct mpr_data *data, const u8 cmd, const u8 pkt_len)
> {
> struct spi_device *spi = to_spi_device(data->dev);
> - struct spi_transfer xfer;
> + struct spi_transfer xfer = { };
>
> if (pkt_len > MPR_MEASUREMENT_RD_SIZE)
> return -EOVERFLOW;
>
Powered by blists - more mailing lists