In unidirectional SPI transfer structures, only tx_buf or rx_buf was initialized, leaving the other buffer undefined. This patch initializes the unused buffer pointers to NULL.
Signed-off-by: Werner Almesberger <wer...@almesberger.net> --- drivers/ieee802154/at86rf230.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/ieee802154/at86rf230.c b/drivers/ieee802154/at86rf230.c index f8b15e9..406bec2 100644 --- a/drivers/ieee802154/at86rf230.c +++ b/drivers/ieee802154/at86rf230.c @@ -71,6 +71,7 @@ __at86rf230_write(struct at86rf230_local *lp, u8 addr, u8 data) struct spi_transfer xfer = { .len = 2, .tx_buf = buf, + .rx_buf = NULL, }; buf[0] = (addr & CMD_REG_MASK) | CMD_REG | CMD_WRITE; @@ -168,11 +169,13 @@ at86rf230_write_fbuf(struct at86rf230_local *lp, u8 *data, u8 len) struct spi_transfer xfer_head = { .len = 2, .tx_buf = buf, + .rx_buf = NULL, }; struct spi_transfer xfer_buf = { .len = len, .tx_buf = data, + .rx_buf = NULL, }; mutex_lock(&lp->bmux); @@ -216,6 +219,7 @@ at86rf230_read_fbuf(struct at86rf230_local *lp, u8 *data, u8 *len, u8 *lqi) }; struct spi_transfer xfer_buf = { .len = 0, + .tx_buf = NULL, .rx_buf = data, }; -- 1.7.0.4 ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense.. http://p.sf.net/sfu/splunk-d2d-c1 _______________________________________________ Linux-zigbee-devel mailing list Linux-zigbee-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel