]> git.baikalelectronics.ru Git - kernel.git/commit
dma-coherent: fix rmem_dma_device_init regression
authorArnd Bergmann <arnd@arndb.de>
Fri, 15 Sep 2017 15:08:16 +0000 (17:08 +0200)
committerChristoph Hellwig <hch@lst.de>
Sun, 17 Sep 2017 15:20:02 +0000 (08:20 -0700)
commit6d57339890c9a9dfcd4ba4f8931b911b962968e3
tree11af5efc5550b5a67d6ef618dd49d1cb07a7d9e0
parent2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e
dma-coherent: fix rmem_dma_device_init regression

My recent bug fix introduced another bug, which caused rmem_dma_device_init
to always fail, as rmem->priv is never set to anything.

This restores the previous behavior, calling dma_init_coherent_memory()
whenever ->priv is NULL.

Fixes: d35b0996fef3 ("dma-coherent: fix dma_declare_coherent_memory() logic error")
Reported-by: Roy Pledge <roy.pledge@nxp.com>
Tested-by: Roy Pledge <roy.pledge@nxp.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/base/dma-coherent.c