Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions drivers/amba/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ static void amba_shutdown(struct device *dev)

static int amba_dma_configure(struct device *dev)
{
struct amba_driver *drv = to_amba_driver(dev->driver);
const struct device_driver *drv = READ_ONCE(dev->driver);
enum dev_dma_attr attr;
int ret = 0;

Expand All @@ -365,7 +365,7 @@ static int amba_dma_configure(struct device *dev)
}

/* @drv may not be valid when we're called from the IOMMU layer */
if (!ret && dev->driver && !drv->driver_managed_dma) {
if (!ret && drv && !to_amba_driver(drv)->driver_managed_dma) {
ret = iommu_device_use_default_domain(dev);
if (ret)
arch_teardown_dma_ops(dev);
Expand Down
Loading