Skip to content

Commit

Permalink
spi/omap2: fix uninitialized variable
Browse files Browse the repository at this point in the history
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 <govindraj.raja@ti.com>
[grant.likely: amended description]
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
  • Loading branch information
Govindraj.R authored and Grant Likely committed Jun 3, 2011
1 parent 1fa7b6a commit 8b20c8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/omap2_mcspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ omap2_mcspi_txrx_dma(struct spi_device *spi, struct spi_transfer *xfer)
unsigned int count, c;
unsigned long base, tx_reg, rx_reg;
int word_len, data_type, element_count;
int elements;
int elements = 0;
u32 l;
u8 * rx;
const u8 * tx;
Expand Down

0 comments on commit 8b20c8c

Please sign in to comment.