Skip to content

Commit

Permalink
dma-debug: Fix bug causing build warning
Browse files Browse the repository at this point in the history
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 f797d98
("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: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Joerg 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: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Ingo Molnar committed Dec 31, 2009
1 parent f405d2c commit a8fe9ea
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/dma-debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -670,14 +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;
return 0;

switch (action) {
case BUS_NOTIFY_UNBOUND_DRIVER:
Expand Down

0 comments on commit a8fe9ea

Please sign in to comment.