Home
last modified time | relevance | path

Searched hist:d773a008ee3135b28becc5ebce050c931767fed8 (Results 1 – 1 of 1) sorted by relevance

/rk3399_rockchip-uboot/common/spl/
H A Dspl_mmc.cd773a008ee3135b28becc5ebce050c931767fed8 Wed Dec 02 17:59:11 UTC 2015 Simon Glass <sjg@chromium.org> spl: mmc: Fix compiler warning with CONFIG_DM_MMC

Since commit 4188ba3 we get the following warning on rockchip boards:

common/spl/spl_mmc.c:31:24: warning: ‘mmc’ may be used uninitialized in this function [-Wmaybe-uninitialized]
count = mmc->block_dev.block_read(0, sector, 1, header);
^
common/spl/spl_mmc.c:251:14: note: ‘mmc’ was declared here
struct mmc *mmc;

Correct this by move the variable init earlier.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Nikita Kiryanov <nikita@compulab.co.il>