Commit a8fe9ea2 authored by Ingo Molnar's avatar Ingo Molnar

dma-debug: Fix bug causing build warning

Stephen Rothwell reported the following build warning:

 lib/dma-debug.c: In function 'dma_debug_device_change':
 lib/dma-debug.c:680: warning: 'return' with no value, in function returning non-void

Introduced by commit f797d988
("dma-debug: Do not add notifier when dma debugging is disabled").

Return 0 [notify-done] when disabled. (this is standard bus notifier behavior.)
Signed-off-by: default avatarShaun Ruffell <sruffell@digium.com>
Signed-off-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: <stable@kernel.org>
LKML-Reference: <20091231125624.GA14666@liondog.tnic>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent f405d2c0
...@@ -670,14 +670,13 @@ static int device_dma_allocations(struct device *dev) ...@@ -670,14 +670,13 @@ static int device_dma_allocations(struct device *dev)
return count; return count;
} }
static int dma_debug_device_change(struct notifier_block *nb, static int dma_debug_device_change(struct notifier_block *nb, unsigned long action, void *data)
unsigned long action, void *data)
{ {
struct device *dev = data; struct device *dev = data;
int count; int count;
if (global_disable) if (global_disable)
return; return 0;
switch (action) { switch (action) {
case BUS_NOTIFY_UNBOUND_DRIVER: case BUS_NOTIFY_UNBOUND_DRIVER:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment