]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
mga_dma: return 'err' not just zero from mga_do_cleanup_dma()
authorJesper Juhl <jesper.juhl@gmail.com>
Sun, 16 Dec 2007 23:47:17 +0000 (09:47 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 7 Feb 2008 05:09:39 +0000 (15:09 +1000)
commita96ca105a68bc66c564accdfeb81c36e1d5d46b3
tree2d0a23821441c94ffa963a043e271d80e943591a
parente3236a1173222ca209d20bb29f6c1cd3499aa845
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>
drivers/char/drm/mga_dma.c