]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drm/nouveau: properly handle allocation failure in nouveau_sgdma_populate
authorMarcin Slusarz <marcin.slusarz@gmail.com>
Mon, 22 Aug 2011 21:14:05 +0000 (23:14 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 3 Oct 2011 18:40:14 +0000 (11:40 -0700)
commit045451f9de4d9b7a7a961bf2428b990edf543271
tree0daaed22d2f41ba461837f1fa37e1f62b8621ee3
parent766357153d2e17eff9bf45ed66bff015472c1159
drm/nouveau: properly handle allocation failure in nouveau_sgdma_populate

commit 17c8b960930da3599e47801a54ac0ea1070545d2 upstream.

Not cleaning after alloc failure would result in crash on destroy,
because nouveau_sgdma_clear assumes "ttm_alloced" to be not null when
"pages" is not null.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/gpu/drm/nouveau/nouveau_sgdma.c