* [PATCH 1/1] staging: iio: initialize data pointer before using it
@ 2016-06-18 21:12 Nicolas Iooss
2016-06-19 9:41 ` Lars-Peter Clausen
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Iooss @ 2016-06-18 21:12 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Greg Kroah-Hartman,
Ksenija Stanojevic
Cc: Jonathan Cameron, Hartmut Knaack, Peter Meerwald-Stadler,
linux-iio, linux-kernel, Nicolas Iooss
ad7606_spi_read_block() reads SPI big-endian data into a buffer which is
then converted to CPU byte-order with a second variable. This variable,
data, has been left unitialized after commit 87787e5ef727 ("Staging:
iio: Fix sparse endian warning").
Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Fixes: 87787e5ef727 ("Staging: iio: Fix sparse endian warning")
---
drivers/staging/iio/adc/ad7606_spi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/iio/adc/ad7606_spi.c b/drivers/staging/iio/adc/ad7606_spi.c
index 825da0769936..9587fa86dc69 100644
--- a/drivers/staging/iio/adc/ad7606_spi.c
+++ b/drivers/staging/iio/adc/ad7606_spi.c
@@ -21,7 +21,7 @@ static int ad7606_spi_read_block(struct device *dev,
{
struct spi_device *spi = to_spi_device(dev);
int i, ret;
- unsigned short *data;
+ unsigned short *data = buf;
__be16 *bdata = buf;
ret = spi_read(spi, buf, count * 2);
--
2.8.3
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 1/1] staging: iio: initialize data pointer before using it
2016-06-18 21:12 [PATCH 1/1] staging: iio: initialize data pointer before using it Nicolas Iooss
@ 2016-06-19 9:41 ` Lars-Peter Clausen
2016-06-19 10:03 ` Nicolas Iooss
0 siblings, 1 reply; 4+ messages in thread
From: Lars-Peter Clausen @ 2016-06-19 9:41 UTC (permalink / raw)
To: Nicolas Iooss, Michael Hennerich, Greg Kroah-Hartman,
Ksenija Stanojevic
Cc: Jonathan Cameron, Hartmut Knaack, Peter Meerwald-Stadler,
linux-iio, linux-kernel
On 06/18/2016 11:12 PM, Nicolas Iooss wrote:
> ad7606_spi_read_block() reads SPI big-endian data into a buffer which is
> then converted to CPU byte-order with a second variable. This variable,
> data, has been left unitialized after commit 87787e5ef727 ("Staging:
> iio: Fix sparse endian warning").
Hi,
Thanks for the patch. A similar patch was already merged last week.
- Lars
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 1/1] staging: iio: initialize data pointer before using it
2016-06-19 9:41 ` Lars-Peter Clausen
@ 2016-06-19 10:03 ` Nicolas Iooss
2016-06-19 11:58 ` Jonathan Cameron
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Iooss @ 2016-06-19 10:03 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Greg Kroah-Hartman,
Ksenija Stanojevic
Cc: Jonathan Cameron, Hartmut Knaack, Peter Meerwald-Stadler,
linux-iio, linux-kernel
On 06/19/2016 11:41 AM, Lars-Peter Clausen wrote:
> On 06/18/2016 11:12 PM, Nicolas Iooss wrote:
>> ad7606_spi_read_block() reads SPI big-endian data into a buffer which is
>> then converted to CPU byte-order with a second variable. This variable,
>> data, has been left unitialized after commit 87787e5ef727 ("Staging:
>> iio: Fix sparse endian warning").
>
> Hi,
>
> Thanks for the patch. A similar patch was already merged last week.
Nice :) Actually I sent this patch because the bug is still present in
linux-next tree [1] and I failed to see a reference to a dedicated
development tree in MAINTAINERS.
Thanks for your quick reply!
-- Nicolas
[1]
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/drivers/staging/iio/adc/ad7606_spi.c
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 1/1] staging: iio: initialize data pointer before using it
2016-06-19 10:03 ` Nicolas Iooss
@ 2016-06-19 11:58 ` Jonathan Cameron
0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2016-06-19 11:58 UTC (permalink / raw)
To: Nicolas Iooss, Lars-Peter Clausen, Michael Hennerich,
Greg Kroah-Hartman, Ksenija Stanojevic
Cc: Hartmut Knaack, Peter Meerwald-Stadler, linux-iio, linux-kernel
On 19/06/16 11:03, Nicolas Iooss wrote:
> On 06/19/2016 11:41 AM, Lars-Peter Clausen wrote:
>> On 06/18/2016 11:12 PM, Nicolas Iooss wrote:
>>> ad7606_spi_read_block() reads SPI big-endian data into a buffer which is
>>> then converted to CPU byte-order with a second variable. This variable,
>>> data, has been left unitialized after commit 87787e5ef727 ("Staging:
>>> iio: Fix sparse endian warning").
>>
>> Hi,
>>
>> Thanks for the patch. A similar patch was already merged last week.
>
> Nice :) Actually I sent this patch because the bug is still present in
> linux-next tree [1] and I failed to see a reference to a dedicated
> development tree in MAINTAINERS.
>
This is just me being slow at sending a pull request.
Good point of the lack of a listed development tree. Will fix that so
no one else wastes their time as you have.
Sorry about that!
Jonathan
> Thanks for your quick reply!
>
> -- Nicolas
>
> [1]
> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/drivers/staging/iio/adc/ad7606_spi.c
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-06-19 11:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-18 21:12 [PATCH 1/1] staging: iio: initialize data pointer before using it Nicolas Iooss
2016-06-19 9:41 ` Lars-Peter Clausen
2016-06-19 10:03 ` Nicolas Iooss
2016-06-19 11:58 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox