mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
dmaengine: core: Revert back to pr_debug in __dma_request_channel()
Commit ef859312c3
("dmaengine: core: Use dev_ functions for debug and
error prints") wasn't quite right in __dma_request_channel() by claiming
that all pr_ prints have valid DMA channel pointer. Obviously it is not
true as __dma_request_channel() is looking for a channel and returns NULL
if it does not find it.
Prevent this potential NULL pointer dereference by reverting back to
pr_debug().
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
This commit is contained in:
parent
ef859312c3
commit
4c4d7f8785
1 changed files with 1 additions and 1 deletions
|
@ -664,7 +664,7 @@ struct dma_chan *__dma_request_channel(const dma_cap_mask_t *mask,
|
|||
}
|
||||
mutex_unlock(&dma_list_mutex);
|
||||
|
||||
dev_dbg(chan->device->dev, "%s: %s (%s)\n",
|
||||
pr_debug("%s: %s (%s)\n",
|
||||
__func__,
|
||||
chan ? "success" : "fail",
|
||||
chan ? dma_chan_name(chan) : NULL);
|
||||
|
|
Loading…
Reference in a new issue