summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorLukas Wunner <lukas@wunner.de>2019-02-03 09:27:00 +0100
committerUlf Hansson <ulf.hansson@linaro.org>2019-02-25 08:40:58 +0100
commite5c1e63c932379b89d7404d4e5fde1bf8abff951 (patch)
treef56ecc6dc5d3da1c1b50e8538f48cdb07626172e /drivers/mmc
parenta6327b5e57fdc679c842588c3be046c0b39cc127 (diff)
downloadlinux-e5c1e63c932379b89d7404d4e5fde1bf8abff951.tar.gz
linux-e5c1e63c932379b89d7404d4e5fde1bf8abff951.tar.bz2
linux-e5c1e63c932379b89d7404d4e5fde1bf8abff951.zip
mmc: bcm2835: Drop DMA channel error pointer check
bcm2835_add_host() invokes IS_ERR_OR_NULL() on a DMA channel pointer, however dma_request_slave_channel() (which was used to populate the pointer) never returns an error pointer. So a NULL pointer check is sufficient. Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Lukas Wunner <lukas@wunner.de> Cc: Frank Pavlic <f.pavlic@kunbus.de> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/bcm2835.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c
index c9e7aa50bb0a..ab8d58a60352 100644
--- a/drivers/mmc/host/bcm2835.c
+++ b/drivers/mmc/host/bcm2835.c
@@ -1286,7 +1286,7 @@ static int bcm2835_add_host(struct bcm2835_host *host)
spin_lock_init(&host->lock);
mutex_init(&host->mutex);
- if (IS_ERR_OR_NULL(host->dma_chan_rxtx)) {
+ if (!host->dma_chan_rxtx) {
dev_warn(dev, "unable to initialise DMA channel. Falling back to PIO\n");
host->use_dma = false;
} else {