diff options
author | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2014-05-06 19:43:26 +0400 |
---|---|---|
committer | Chris Ball <chris@printf.net> | 2014-05-13 02:08:23 +0400 |
commit | 6e9e4062823dd3553eef6dc903223ffa07432e3c (patch) | |
tree | d8d5dc0087115d727805de66cdf6343e14d7fd49 /drivers/mmc/host/atmel-mci.c | |
parent | b677b8850322b210a81b72ffcc7de85a3df395c5 (diff) | |
download | linux-6e9e4062823dd3553eef6dc903223ffa07432e3c.tar.xz |
mmc: atmel: don't test host->data
Found using smatch:
drivers/mmc/host/atmel-mci.c:827 atmci_pdc_complete() warn: variable
dereferenced before check 'host->data' (see line 807)
Stop testing host->data as it is not NULL at that point.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <chris@printf.net>
Diffstat (limited to 'drivers/mmc/host/atmel-mci.c')
-rw-r--r-- | drivers/mmc/host/atmel-mci.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index 42706ea0ba85..aece7cafbb97 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -820,16 +820,9 @@ static void atmci_pdc_complete(struct atmel_mci *host) atmci_pdc_cleanup(host); - /* - * If the card was removed, data will be NULL. No point trying - * to send the stop command or waiting for NBUSY in this case. - */ - if (host->data) { - dev_dbg(&host->pdev->dev, - "(%s) set pending xfer complete\n", __func__); - atmci_set_pending(host, EVENT_XFER_COMPLETE); - tasklet_schedule(&host->tasklet); - } + dev_dbg(&host->pdev->dev, "(%s) set pending xfer complete\n", __func__); + atmci_set_pending(host, EVENT_XFER_COMPLETE); + tasklet_schedule(&host->tasklet); } static void atmci_dma_cleanup(struct atmel_mci *host) |