Skip to content

Commit e5c1e63

Browse files
l1kstorulf
authored andcommitted
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 <[email protected]> Signed-off-by: Lukas Wunner <[email protected]> Cc: Frank Pavlic <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
1 parent a6327b5 commit e5c1e63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mmc/host/bcm2835.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1286,7 +1286,7 @@ static int bcm2835_add_host(struct bcm2835_host *host)
12861286
spin_lock_init(&host->lock);
12871287
mutex_init(&host->mutex);
12881288

1289-
if (IS_ERR_OR_NULL(host->dma_chan_rxtx)) {
1289+
if (!host->dma_chan_rxtx) {
12901290
dev_warn(dev, "unable to initialise DMA channel. Falling back to PIO\n");
12911291
host->use_dma = false;
12921292
} else {

0 commit comments

Comments
 (0)