Skip to content

Commit

Permalink
mmc: tmio, renesas_sdhi: Remove unneeded NULL check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Ulf Hansson committed Jan 11, 2018
1 parent 90e1d8c commit b8155d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mmc/host/renesas_sdhi_sys_dmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b8155d3

Please sign in to comment.