summaryrefslogtreecommitdiffstats
path: root/drivers/char/drm
diff options
context:
space:
mode:
authorJesper Juhl <jesper.juhl@gmail.com>2007-12-17 00:47:17 +0100
committerDave Airlie <airlied@redhat.com>2008-02-07 06:09:39 +0100
commita96ca105a68bc66c564accdfeb81c36e1d5d46b3 (patch)
tree2d0a23821441c94ffa963a043e271d80e943591a /drivers/char/drm
parentdrm: add _DRM_DRIVER flag, and re-order unload. (diff)
downloadlinux-a96ca105a68bc66c564accdfeb81c36e1d5d46b3.tar.xz
linux-a96ca105a68bc66c564accdfeb81c36e1d5d46b3.zip
mga_dma: return 'err' not just zero from mga_do_cleanup_dma()
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> Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm')
-rw-r--r--drivers/char/drm/mga_dma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/drm/mga_dma.c b/drivers/char/drm/mga_dma.c
index 04998b741cad..9d95f6078764 100644
--- a/drivers/char/drm/mga_dma.c
+++ b/drivers/char/drm/mga_dma.c
@@ -998,7 +998,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,