diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dma-debug.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/dma-debug.c b/lib/dma-debug.c index d9b08e0f7f5..cf906201aec 100644 --- a/lib/dma-debug.c +++ b/lib/dma-debug.c @@ -670,12 +670,13 @@ static int device_dma_allocations(struct device *dev) return count; } -static int dma_debug_device_change(struct notifier_block *nb, - unsigned long action, void *data) +static int dma_debug_device_change(struct notifier_block *nb, unsigned long action, void *data) { struct device *dev = data; int count; + if (global_disable) + return 0; switch (action) { case BUS_NOTIFY_UNBOUND_DRIVER: @@ -697,6 +698,9 @@ void dma_debug_add_bus(struct bus_type *bus) { struct notifier_block *nb; + if (global_disable) + return; + nb = kzalloc(sizeof(struct notifier_block), GFP_KERNEL); if (nb == NULL) { pr_err("dma_debug_add_bus: out of memory\n"); |