]> Git Repo - linux.git/commitdiff
dma-debug: Fix bug causing build warning
authorIngo Molnar <[email protected]>
Thu, 31 Dec 2009 14:16:23 +0000 (15:16 +0100)
committerIngo Molnar <[email protected]>
Thu, 31 Dec 2009 14:16:23 +0000 (15:16 +0100)
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 f797d9881b62c2ddb1d2e7bd80d87141949c84aa
("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 <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: <[email protected]>
LKML-Reference: <20091231125624[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
lib/dma-debug.c

index 739974460c32109cf2b7eb53c207f2db79be37e3..cf906201aecfcece0a10b008a84ab6a08b6ba992 100644 (file)
@@ -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:
This page took 0.057078 seconds and 4 git commands to generate.