summaryrefslogtreecommitdiff
path: root/shared-core
diff options
context:
space:
mode:
authorJesper Juhl <jesper.juhl@gmail.com>2007-12-17 09:45:03 +1000
committerDave Airlie <airlied@redhat.com>2007-12-17 09:45:03 +1000
commit6180dbda203161b8926513cca4ee963bbbf18cc9 (patch)
treea24e6694b3b1c703a012a163bc551bb2f8051df0 /shared-core
parent0b031dbd63bbb3e0ba6d39e1e5c4eb4e87985158 (diff)
While reading some code I stumbled across the use of 'err' in
drivers/char/drm/mga_dma.c::mga_do_cleanup_dma() and I think there's a small problem. The variable is only used inside #if __OS_HAS_AGP which is fine, but all that ever happens is an assignment to the variable - it is never actually used for anything. The variable is nicely initialized to zero which is also what the return statement at the end of function returns (always at the moment). It looks to me like that function should be returning 'err' instead of always just returning 0. Here's a patch to do that. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'shared-core')
-rw-r--r--shared-core/mga_dma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shared-core/mga_dma.c b/shared-core/mga_dma.c
index 67236b2d..00154b23 100644
--- a/shared-core/mga_dma.c
+++ b/shared-core/mga_dma.c
@@ -997,7 +997,7 @@ static int mga_do_cleanup_dma(struct drm_device *dev, int full_cleanup)
}
}
- return 0;
+ return err;
}
int mga_dma_init(struct drm_device *dev, void *data,