Skip to content

Commit 8b20c8c

Browse files
Govindraj.Rglikely
authored andcommitted
spi/omap2: fix uninitialized variable
fixes below compilation warning. The variable doesn't actual ever get used uninitialized, but that's no reason to be sloppy. drivers/spi/omap2_mcspi.c: In function 'omap2_mcspi_txrx_dma': drivers/spi/omap2_mcspi.c:301: warning: 'elements' may be used uninitialized in this function Signed-off-by: Govindraj.R <[email protected]> [grant.likely: amended description] Signed-off-by: Grant Likely <[email protected]>
1 parent 1fa7b6a commit 8b20c8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/spi/omap2_mcspi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ omap2_mcspi_txrx_dma(struct spi_device *spi, struct spi_transfer *xfer)
298298
unsigned int count, c;
299299
unsigned long base, tx_reg, rx_reg;
300300
int word_len, data_type, element_count;
301-
int elements;
301+
int elements = 0;
302302
u32 l;
303303
u8 * rx;
304304
const u8 * tx;

0 commit comments

Comments
 (0)