Merge tag 'linux-kselftest-kunit-5.10-rc1' of git://git.kernel.org/pub/scm/linux...
[linux-2.6-microblaze.git] / drivers / dma / dmaengine.c
index a53e71d..7974fa0 100644 (file)
@@ -847,8 +847,10 @@ struct dma_chan *dma_request_chan(struct device *dev, const char *name)
        }
        mutex_unlock(&dma_list_mutex);
 
-       if (IS_ERR_OR_NULL(chan))
-               return chan ? chan : ERR_PTR(-EPROBE_DEFER);
+       if (IS_ERR(chan))
+               return chan;
+       if (!chan)
+               return ERR_PTR(-EPROBE_DEFER);
 
 found:
 #ifdef CONFIG_DEBUG_FS
@@ -871,24 +873,6 @@ found:
 }
 EXPORT_SYMBOL_GPL(dma_request_chan);
 
-/**
- * dma_request_slave_channel - try to allocate an exclusive slave channel
- * @dev:       pointer to client device structure
- * @name:      slave channel name
- *
- * Returns pointer to appropriate DMA channel on success or NULL.
- */
-struct dma_chan *dma_request_slave_channel(struct device *dev,
-                                          const char *name)
-{
-       struct dma_chan *ch = dma_request_chan(dev, name);
-       if (IS_ERR(ch))
-               return NULL;
-
-       return ch;
-}
-EXPORT_SYMBOL_GPL(dma_request_slave_channel);
-
 /**
  * dma_request_chan_by_mask - allocate a channel satisfying certain capabilities
  * @mask:      capabilities that the channel must satisfy