Skip to content

Commit a8fe9ea

Browse files
author
Ingo Molnar
committed
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 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>
1 parent f405d2c commit a8fe9ea

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎lib/dma-debug.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -670,14 +670,13 @@ static int device_dma_allocations(struct device *dev)
670670
return count;
671671
}
672672

673-
static int dma_debug_device_change(struct notifier_block *nb,
674-
unsigned long action, void *data)
673+
static int dma_debug_device_change(struct notifier_block *nb, unsigned long action, void *data)
675674
{
676675
struct device *dev = data;
677676
int count;
678677

679678
if (global_disable)
680-
return;
679+
return 0;
681680

682681
switch (action) {
683682
case BUS_NOTIFY_UNBOUND_DRIVER:

0 commit comments

Comments
 (0)