]> git.baikalelectronics.ru Git - kernel.git/commit
agp/intel: Destroy the scatterlist on allocation failure
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 24 Jul 2010 17:29:37 +0000 (18:29 +0100)
committerEric Anholt <eric@anholt.net>
Mon, 2 Aug 2010 02:35:14 +0000 (19:35 -0700)
commit32e9592fc56fa7b37466c4d42d0866a8d85fce7b
tree242d8e619cf40f3f760f4a26b16e6344f3ca6cfc
parent76d6abe9fb18e790dca6b8ad27071a40c756938f
agp/intel: Destroy the scatterlist on allocation failure

A side-effect of being able to use custom page allocations with the
sg_table is that it cannot reap the partially constructed scatterlist if
fails to allocate a page. So we need to call sg_free_table() ourselves
if sg_alloc_table() fails.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc Dave Airlie <airlied@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/char/agp/intel-gtt.c