From: Heinrich Schuchardt Date: Fri, 10 Nov 2017 20:13:34 +0000 (+0100) Subject: mmc: sdhci: do not compare pointer to 0 X-Git-Tag: v2018.03-rc1~192^2~51 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bb7b4ef3704cfd25e30a36f76342df118ec24a25;p=platform%2Fkernel%2Fu-boot.git 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 Reviewed-by: Bin Meng --- diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index f0c5aad..e2ddf5d 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -202,7 +202,7 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd, flags |= SDHCI_CMD_DATA; /* Set Transfer mode regarding to data flag */ - if (data != 0) { + if (data) { sdhci_writeb(host, 0xe, SDHCI_TIMEOUT_CONTROL); mode = SDHCI_TRNS_BLK_CNT_EN; 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); #ifdef CONFIG_MMC_SDHCI_SDMA - if (data != 0) { + if (data) { trans_bytes = ALIGN(trans_bytes, CONFIG_SYS_CACHELINE_SIZE); flush_cache(start_addr, trans_bytes); }