]> Git Repo - linux.git/commitdiff
mmc: core: properly init drv_type
authorWolfram Sang <[email protected]>
Thu, 30 Nov 2017 14:49:10 +0000 (15:49 +0100)
committerUlf Hansson <[email protected]>
Tue, 5 Dec 2017 16:14:00 +0000 (17:14 +0100)
When the latest version of parsing the new eMMC bindings was moved from
core.c to mmc.c, it was overlooked that drv_type could be used
uninitialized. Fix it!

Fixes: 6186d06c519e21 ("mmc: parse new binding for eMMC fixed driver type")
Reported-by: Colin Ian King <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
drivers/mmc/core/mmc.c

index d209fb466979015d3d668beab293e60b9657c0fc..208a762b87ef2876914d641b38fc61858429a22e 100644 (file)
@@ -1290,7 +1290,7 @@ out_err:
 
 static void mmc_select_driver_type(struct mmc_card *card)
 {
-       int card_drv_type, drive_strength, drv_type;
+       int card_drv_type, drive_strength, drv_type = 0;
        int fixed_drv_type = card->host->fixed_drv_type;
 
        card_drv_type = card->ext_csd.raw_driver_strength |
This page took 0.060437 seconds and 4 git commands to generate.