mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-05 00:48:08 +02:00
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>
This commit is contained in:
parent
0b031dbd63
commit
6180dbda20
1 changed files with 1 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue