]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
spi/omap2: fix uninitialized variable
authorGovindraj.R <govindraj.raja@ti.com>
Wed, 1 Jun 2011 06:01:24 +0000 (11:31 +0530)
committerGrant Likely <grant.likely@secretlab.ca>
Fri, 3 Jun 2011 20:57:07 +0000 (14:57 -0600)
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>
drivers/spi/omap2_mcspi.c

index 6f86ba0175ac9636e564f44cf23ff41223de6b8a..969cdd2fe124602d1e65c4218190ed3e7d78ccf6 100644 (file)
@@ -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;