OSDN Git Service

mmc: tmio, renesas_sdhi: Remove unneeded NULL check
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 9 Jan 2018 09:39:10 +0000 (12:39 +0300)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 11 Jan 2018 14:51:01 +0000 (15:51 +0100)
The inconsistent NULL checking in this function causes static checker
warnings.

    drivers/mmc/host/renesas_sdhi_sys_dmac.c:360 renesas_sdhi_sys_dmac_issue_tasklet_fn()
    error: we previously assumed 'host' could be null (see line 351)

On reviewing this code, "host" can't ever be NULL so we can just remove
the check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/renesas_sdhi_sys_dmac.c

index c8a74b2..82d757c 100644 (file)
@@ -348,7 +348,7 @@ static void renesas_sdhi_sys_dmac_issue_tasklet_fn(unsigned long priv)
 
        spin_lock_irq(&host->lock);
 
-       if (host && host->data) {
+       if (host->data) {
                if (host->data->flags & MMC_DATA_READ)
                        chan = host->chan_rx;
                else