From: Francisco Jerez Date: Mon, 1 Nov 2010 17:06:28 +0000 (+0100) Subject: drm/nouveau: Return error from nouveau_gpuobj_new if we're out of RAMIN. X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=dd661e5f4e87609e7a9b4cbdff305dca7f494e7b;p=openwrt%2Fstaging%2Fblogic.git drm/nouveau: Return error from nouveau_gpuobj_new if we're out of RAMIN. Reported-by: Tomas Miljenovic Signed-off-by: Francisco Jerez Signed-off-by: Ben Skeggs --- diff --git a/drivers/gpu/drm/nouveau/nouveau_object.c b/drivers/gpu/drm/nouveau/nouveau_object.c index 896cf8634144..dd572adca02a 100644 --- a/drivers/gpu/drm/nouveau/nouveau_object.c +++ b/drivers/gpu/drm/nouveau/nouveau_object.c @@ -129,7 +129,7 @@ nouveau_gpuobj_new(struct drm_device *dev, struct nouveau_channel *chan, if (ramin == NULL) { spin_unlock(&dev_priv->ramin_lock); nouveau_gpuobj_ref(NULL, &gpuobj); - return ret; + return -ENOMEM; } ramin = drm_mm_get_block_atomic(ramin, size, align);