[bug report] mmc: parse new binding for eMMC fixed driver type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Wolfram Sang,

The patch 6186d06c519e: "mmc: parse new binding for eMMC fixed driver
type" from Oct 15, 2017, leads to the following static checker
warning:

	drivers/mmc/core/mmc.c:1309 mmc_select_driver_type()
	error: uninitialized symbol 'drv_type'.

drivers/mmc/core/mmc.c
  1291  static void mmc_select_driver_type(struct mmc_card *card)
  1292  {
  1293          int card_drv_type, drive_strength, drv_type;
  1294          int fixed_drv_type = card->host->fixed_drv_type;
  1295  
  1296          card_drv_type = card->ext_csd.raw_driver_strength |
  1297                          mmc_driver_type_mask(0);
  1298  
  1299          if (fixed_drv_type >= 0)
  1300                  drive_strength = card_drv_type & mmc_driver_type_mask(fixed_drv_type)
  1301                                   ? fixed_drv_type : 0;

drv_type is not initialized if fixed_drv_type is greater than zero.

  1302          else
  1303                  drive_strength = mmc_select_drive_strength(card,
  1304                                                             card->ext_csd.hs200_max_dtr,
  1305                                                             card_drv_type, &drv_type);
  1306  
  1307          card->drive_strength = drive_strength;
  1308  
  1309          if (drv_type)
                    ^^^^^^^^

  1310                  mmc_set_driver_type(card->host, drv_type);
  1311  }

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux