Skip to content
Commit a96ca105 authored by Jesper Juhl's avatar Jesper Juhl Committed by Dave Airlie
Browse files

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: default avatarJesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarDave Airlie <airlied@linux.ie>
parent e3236a11
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment