From patchwork Wed Mar 21 21:40:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 7397 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 D94EE1991E2 for ; Wed, 21 Mar 2012 21:40:28 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 982A5A18846 for ; Wed, 21 Mar 2012 21:40:28 +0000 (UTC) Received: by iage36 with SMTP id e36so2836486iag.11 for ; Wed, 21 Mar 2012 14:40:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :dkim-signature:sender:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=PLUuQPLc8v+YOVCkLguE+eETKdJuI+HiTeZL8i1l5YQ=; b=KsDqEdnmy4BuOia1ZFOUQ95wme9IBMCo0+6PjrrfUzrcmV4TikO8iQ9wc9ryweUoUn j56oTS2kPnrwMErdrX2q1TZOWRnHYaUzD6cPwrevhXCTJsA2zKHLVI0NZYqPZZsnA6Y2 6YYUnCtqdLgxGzPx8x9i1pCApPd4UWL8eMzZXywOcCfuZCqTLHwzYRFqw1o8vrvK0NzE DvYlnWGG8/leShviT6r87/yVPpr2+r1zZx232IXRbHue69j/5ue2C79rdSncgI1nGTDD ui3vviss+kBrqvWGtwfq3TVgNgVnJ/inCs/p1h1A5bcn6p/ilqHKVebvFH5DC9eDO5SQ /Kuw== Received: by 10.50.153.193 with SMTP id vi1mr4009402igb.2.1332366028010; Wed, 21 Mar 2012 14:40:28 -0700 (PDT) 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.231.203.79 with SMTP id fh15csp30960ibb; Wed, 21 Mar 2012 14:40:27 -0700 (PDT) Received: by 10.182.193.6 with SMTP id hk6mr6823724obc.31.1332366027079; Wed, 21 Mar 2012 14:40:27 -0700 (PDT) Received: from mail-ob0-f178.google.com (mail-ob0-f178.google.com [209.85.214.178]) by mx.google.com with ESMTPS id 1si2015492oex.35.2012.03.21.14.40.26 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 21 Mar 2012 14:40:27 -0700 (PDT) Received-SPF: pass (google.com: domain of robdclark@gmail.com designates 209.85.214.178 as permitted sender) client-ip=209.85.214.178; Authentication-Results: mx.google.com; spf=pass (google.com: domain of robdclark@gmail.com designates 209.85.214.178 as permitted sender) smtp.mail=robdclark@gmail.com; dkim=pass header.i=@gmail.com Received: by obbuo19 with SMTP id uo19so1259761obb.37 for ; Wed, 21 Mar 2012 14:40:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer; bh=PLUuQPLc8v+YOVCkLguE+eETKdJuI+HiTeZL8i1l5YQ=; b=vwWTF0gWN4RhxFh/qwVxESEsdKmZFRbghFzfR+SiAOpFVAxP3ar7ER1qy5kyCf8MuA rYPY8u28p2FLB9d8znc9ncZtvZN6Dls76nRA8xENCq5FkLNTlHA+yzHFXrb1S4g6iBXf jcyBdRALVyrqJ+MNpsA3UhKLt1/AGHDIvFTvrAY984zZ8vdvpmpwgP+CqUBIpynP288N ZeaNDoZQcVAqa9QK9pykXMFPKE4bmZntoV6r/SFqS4cNWRYFtW+LALyOYBjJ0S0vUE4Y t9tWM7xInMAsg3TcdfDpoL0/fKQrcckitxX7ZSf/TsjAjy9uHc7hGa0kBmEA8mOHu+BG IHtA== Received: by 10.182.169.41 with SMTP id ab9mr6907570obc.4.1332366026291; Wed, 21 Mar 2012 14:40:26 -0700 (PDT) Received: from localhost (dragon.ti.com. [192.94.94.33]) by mx.google.com with ESMTPS id n1sm2787228obm.11.2012.03.21.14.40.24 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 21 Mar 2012 14:40:25 -0700 (PDT) Sender: Rob Clark From: Rob Clark To: dri-devel@lists.freedesktop.org, linux-omap@vger.kernel.org Cc: patches@linaro.org, Greg KH , Tomi Valkeinen , Andy Gross , Rob Clark Subject: [PATCH] staging: omap/drm: dmm should return proper errors Date: Wed, 21 Mar 2012 16:40:23 -0500 Message-Id: <1332366023-23218-1-git-send-email-rob.clark@linaro.org> X-Mailer: git-send-email 1.7.5.4 X-Gm-Message-State: ALoCoQn51qGN99crnpEbT40Zb8nOo70Aaya5sIleqXx/Rj7XprzZu1a6HCY8WqT4tTCe0R8TAzOS From: Rob Clark Minor error path clean-up. Signed-off-by: Rob Clark --- drivers/staging/omapdrm/omap_dmm_tiler.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/omapdrm/omap_dmm_tiler.c b/drivers/staging/omapdrm/omap_dmm_tiler.c index 852d944..33c1d54 100644 --- a/drivers/staging/omapdrm/omap_dmm_tiler.c +++ b/drivers/staging/omapdrm/omap_dmm_tiler.c @@ -345,7 +345,7 @@ struct tiler_block *tiler_reserve_2d(enum tiler_fmt fmt, uint16_t w, ret = tcm_reserve_2d(containers[fmt], w, h, align, &block->area); if (ret) { kfree(block); - return 0; + return ERR_PTR(-ENOMEM); } /* add to allocation list */ @@ -369,7 +369,7 @@ struct tiler_block *tiler_reserve_1d(size_t size) if (tcm_reserve_1d(containers[TILFMT_PAGE], num_pages, &block->area)) { kfree(block); - return 0; + return ERR_PTR(-ENOMEM); } spin_lock(&omap_dmm->list_lock);