linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iio: adc: dln2-adc: initialize local struct before using it
@ 2017-09-10 12:45 Martin Kepplinger
  2017-09-10 15:30 ` Jonathan Cameron
  2017-09-12  1:32 ` kbuild test robot
  0 siblings, 2 replies; 5+ messages in thread
From: Martin Kepplinger @ 2017-09-10 12:45 UTC (permalink / raw)
  To: jic23, knaack.h, lars, pmeerw; +Cc: linux-iio, linux-kernel, Martin Kepplinger

struct data is defined and declared locally. Initiliazation has to be done
manually, so let's add that.

Signed-off-by: Martin Kepplinger <martink@posteo.de>
---

This is more of a question actually! Did you have in mind that data is
not initialized here? If so, please drop this patch. This is just in case
you implicitely expected data to be zero.


 drivers/iio/adc/dln2-adc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/adc/dln2-adc.c b/drivers/iio/adc/dln2-adc.c
index ab8d6aed5085..452330075b67 100644
--- a/drivers/iio/adc/dln2-adc.c
+++ b/drivers/iio/adc/dln2-adc.c
@@ -489,7 +489,7 @@ static irqreturn_t dln2_adc_trigger_h(int irq, void *p)
 	struct {
 		__le16 values[DLN2_ADC_MAX_CHANNELS];
 		int64_t timestamp_space;
-	} data;
+	} data = { 0 };
 	struct dln2_adc_get_all_vals dev_data;
 	struct dln2_adc *dln2 = iio_priv(indio_dev);
 	const struct dln2_adc_demux_table *t;
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-09-13 16:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-10 12:45 [PATCH] iio: adc: dln2-adc: initialize local struct before using it Martin Kepplinger
2017-09-10 15:30 ` Jonathan Cameron
2017-09-12  1:32 ` kbuild test robot
2017-09-12  7:01   ` Martin Kepplinger
2017-09-13 16:52     ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).