mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 15:41:40 +00:00
mmc: sdhci: do not compare pointer to 0
data is defined as struct mmc_data *data. So it should not be compared to 0. Problem identified with Coccinelle. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
713e6815d9
commit
bb7b4ef370
1 changed files with 2 additions and 2 deletions
|
@ -202,7 +202,7 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd,
|
||||||
flags |= SDHCI_CMD_DATA;
|
flags |= SDHCI_CMD_DATA;
|
||||||
|
|
||||||
/* Set Transfer mode regarding to data flag */
|
/* Set Transfer mode regarding to data flag */
|
||||||
if (data != 0) {
|
if (data) {
|
||||||
sdhci_writeb(host, 0xe, SDHCI_TIMEOUT_CONTROL);
|
sdhci_writeb(host, 0xe, SDHCI_TIMEOUT_CONTROL);
|
||||||
mode = SDHCI_TRNS_BLK_CNT_EN;
|
mode = SDHCI_TRNS_BLK_CNT_EN;
|
||||||
trans_bytes = data->blocks * data->blocksize;
|
trans_bytes = data->blocks * data->blocksize;
|
||||||
|
@ -250,7 +250,7 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd,
|
||||||
|
|
||||||
sdhci_writel(host, cmd->cmdarg, SDHCI_ARGUMENT);
|
sdhci_writel(host, cmd->cmdarg, SDHCI_ARGUMENT);
|
||||||
#ifdef CONFIG_MMC_SDHCI_SDMA
|
#ifdef CONFIG_MMC_SDHCI_SDMA
|
||||||
if (data != 0) {
|
if (data) {
|
||||||
trans_bytes = ALIGN(trans_bytes, CONFIG_SYS_CACHELINE_SIZE);
|
trans_bytes = ALIGN(trans_bytes, CONFIG_SYS_CACHELINE_SIZE);
|
||||||
flush_cache(start_addr, trans_bytes);
|
flush_cache(start_addr, trans_bytes);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue