• Will Deacon's avatar
    of: restricted dma: Don't fail device probe on rmem init failure · f3cfd136
    Will Deacon authored
    If CONFIG_DMA_RESTRICTED_POOL=n then probing a device with a reference
    to a "restricted-dma-pool" will fail with a reasonably cryptic error:
      | pci-host-generic: probe of 10000.pci failed with error -22
    Rework of_dma_set_restricted_buffer() so that it does not cause probing
    failure and instead either returns early if CONFIG_DMA_RESTRICTED_POOL=n
    or emits a diagnostic if the reserved DMA pool fails to initialise.
    Cc: Claire Chang <tientzu@chromium.org>
    Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    Cc: Christoph Hellwig <hch@lst.de>
    Cc: Rob Herring <robh+dt@kernel.org>
    Cc: Robin Murphy <robin.murphy@arm.com>
    Signed-off-by: default avatarWill Deacon <will@kernel.org>
    Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>