Skip to content

Commit

Permalink
agp/intel: Fix wrong kunmap in i830_cleanup()
Browse files Browse the repository at this point in the history
Add a missing NULL check and fix the wrong address passed to kunmap()
in i830_cleanup().

Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
[danvet: added cc stable]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
  • Loading branch information
Takashi Iwai authored and Chris Wilson committed Dec 5, 2010
1 parent 49078f7 commit 136711b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/char/agp/intel-gtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -812,8 +812,10 @@ static int intel_fake_agp_fetch_size(void)

static void i830_cleanup(void)
{
kunmap(intel_private.i8xx_page);
intel_private.i8xx_flush_page = NULL;
if (intel_private.i8xx_flush_page) {
kunmap(intel_private.i8xx_flush_page);
intel_private.i8xx_flush_page = NULL;
}

__free_page(intel_private.i8xx_page);
intel_private.i8xx_page = NULL;
Expand Down

0 comments on commit 136711b

Please sign in to comment.