drm/ttm: handle OOM in ttm_tt_swapout
authorMaarten Maathuis <madman2003@gmail.com>
Sat, 20 Feb 2010 02:22:21 +0000 (03:22 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 15 Mar 2010 15:50:12 +0000 (08:50 -0700)
commitd234eee1361df33b8ab4dcc2a36f6bd605cdbb1a
treedca9e29233699be779628257dec0994f44f7766d
parent605fa278907012c31b3d3896a52dcc432a5d9953
drm/ttm: handle OOM in ttm_tt_swapout

commit 290e55056ec3d25c72088628245d8cae037b30db upstream.

- Without this change I get a general protection fault.
- Also use PTR_ERR where applicable.

Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/gpu/drm/ttm/ttm_tt.c