From patchwork Sat Dec 10 05:26:06 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 5568 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id B9A1423E04 for ; Sat, 10 Dec 2011 05:26:11 +0000 (UTC) Received: from mail-bw0-f52.google.com (mail-bw0-f52.google.com [209.85.214.52]) by fiordland.canonical.com (Postfix) with ESMTP id 9C788A18160 for ; Sat, 10 Dec 2011 05:26:11 +0000 (UTC) Received: by bke17 with SMTP id 17so5065321bke.11 for ; Fri, 09 Dec 2011 21:26:11 -0800 (PST) Received: by 10.204.152.83 with SMTP id f19mr5441780bkw.90.1323494771295; Fri, 09 Dec 2011 21:26:11 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.205.129.2 with SMTP id hg2cs126008bkc; Fri, 9 Dec 2011 21:26:10 -0800 (PST) Received: by 10.236.153.226 with SMTP id f62mr16061251yhk.62.1323494767721; Fri, 09 Dec 2011 21:26:07 -0800 (PST) Received: from mail-yx0-f178.google.com (mail-yx0-f178.google.com [209.85.213.178]) by mx.google.com with ESMTPS id c2si5031068ybc.53.2011.12.09.21.26.07 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 09 Dec 2011 21:26:07 -0800 (PST) Received-SPF: pass (google.com: domain of robdclark@gmail.com designates 209.85.213.178 as permitted sender) client-ip=209.85.213.178; Authentication-Results: mx.google.com; spf=pass (google.com: domain of robdclark@gmail.com designates 209.85.213.178 as permitted sender) smtp.mail=robdclark@gmail.com; dkim=pass (test mode) header.i=@gmail.com Received: by yenm5 with SMTP id m5so3432608yen.37 for ; Fri, 09 Dec 2011 21:26:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer; bh=xtqlKPLSEy17uJJL1OgAZhDzDpUfS3zMIC0aNSuwG+0=; b=hWsFBN0a6TV9V3Bm2T9opUvVHIJ1g80UFb11l3r/Poca+E0mA7l5Ayx/klL1IO1ALM YzP3/GvDCgb2cFTqbdX0XzukGwSCC0v2z0cOBtT49fakWjySY4pIJQyerI2YuMrG/HdK SyETcJ9O3KZ7jmm1y8sI9UoooqqDv10qKjFsY= Received: by 10.236.83.112 with SMTP id p76mr15965559yhe.118.1323494767237; Fri, 09 Dec 2011 21:26:07 -0800 (PST) Received: from localhost (ppp-70-253-156-7.dsl.rcsntx.swbell.net. [70.253.156.7]) by mx.google.com with ESMTPS id 32sm30314290ant.12.2011.12.09.21.26.06 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 09 Dec 2011 21:26:06 -0800 (PST) Sender: Rob Clark From: Rob Clark To: dri-devel@lists.freedesktop.org Cc: patches@linaro.org, Greg KH , Tomi Valkeinen , Rob Clark Subject: [PATCH 1/3] drm/omap: allocation fail check Date: Fri, 9 Dec 2011 23:26:06 -0600 Message-Id: <1323494768-11509-1-git-send-email-rob.clark@linaro.org> X-Mailer: git-send-email 1.7.5.4 From: Rob Clark Signed-off-by: Rob Clark --- drivers/staging/omapdrm/omap_gem.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/staging/omapdrm/omap_gem.c b/drivers/staging/omapdrm/omap_gem.c index 1054da3..a451c57 100644 --- a/drivers/staging/omapdrm/omap_gem.c +++ b/drivers/staging/omapdrm/omap_gem.c @@ -1094,6 +1094,10 @@ void omap_gem_init(struct drm_device *dev) } usergart = kzalloc(3 * sizeof(*usergart), GFP_KERNEL); + if (!usergart) { + dev_warn(dev->dev, "could not allocate usergart\n"); + return; + } /* reserve 4k aligned/wide regions for userspace mappings: */ for (i = 0; i < ARRAY_SIZE(fmts); i++) {