From: Lukas Wunner Date: Sun, 3 Feb 2019 08:27:00 +0000 (+0100) Subject: mmc: bcm2835: Drop DMA channel error pointer check X-Git-Tag: v5.1-rc1~184^2~33 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=e5c1e63c932379b89d7404d4e5fde1bf8abff951;p=uclinux-h8%2Flinux.git 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 Signed-off-by: Lukas Wunner Cc: Frank Pavlic Signed-off-by: Ulf Hansson --- 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 {