From patchwork Tue Dec 16 10:38:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 42314 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CF58C26C54 for ; Tue, 16 Dec 2014 10:38:38 +0000 (UTC) Received: by mail-lb0-f199.google.com with SMTP id u10sf8441014lbd.2 for ; Tue, 16 Dec 2014 02:38:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=ow/JJXaT3ClNmEeshPaQX3RRnNgqtUwCesRHjr7+uJU=; b=JeQ+bIOexZFBcOl22ADYw1lmDltTyWjbvjZAqRKdPwOiJGo7WmcEPUAep9ZdMNF1A6 xWNnek9WMPGgDCMXMd30wZusii+2JNVqg1wB9+J+lyBXrYVxmy2FUamanCuLm+mxmMTM RyvTWzSfEGS5c2oIamqanuoZCd7NCQTt8YL/CobF3A82C8rX3vGXOQgdgmExEvfydCKe zwkSCulwB5ifEP9Jl8rSwqj/XCHd2W8HEuq/1vlqN5liMpV8ABPBhpHwivDLs/8tsdCc AAVdW4RmnTCIOr9Ca3h8Zahl7gntnZSOFYLNMzUQIrNX4UoGhoX70pBKFuJGeShFbXcI numQ== X-Gm-Message-State: ALoCoQmG3P+3z4PW2Q3GuiIUBih/YzhBHhT7hTAd2EpNq6AINMPl8dKUhhvE67QhSErrusB2U61F X-Received: by 10.112.159.199 with SMTP id xe7mr78697lbb.21.1418726317812; Tue, 16 Dec 2014 02:38:37 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.207.3 with SMTP id ls3ls836982lac.46.gmail; Tue, 16 Dec 2014 02:38:37 -0800 (PST) X-Received: by 10.152.21.9 with SMTP id r9mr35063196lae.76.1418726317661; Tue, 16 Dec 2014 02:38:37 -0800 (PST) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id j9si427828lam.35.2014.12.16.02.38.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 16 Dec 2014 02:38:37 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by mail-la0-f44.google.com with SMTP id gd6so11155032lab.3 for ; Tue, 16 Dec 2014 02:38:37 -0800 (PST) X-Received: by 10.112.135.6 with SMTP id po6mr1689544lbb.69.1418726317209; Tue, 16 Dec 2014 02:38:37 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.142.69 with SMTP id ru5csp992296lbb; Tue, 16 Dec 2014 02:38:36 -0800 (PST) X-Received: by 10.140.37.71 with SMTP id q65mr516858qgq.42.1418726315428; Tue, 16 Dec 2014 02:38:35 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id o8si400870qat.26.2014.12.16.02.38.34 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 16 Dec 2014 02:38:35 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Y0pWS-0002bz-Qd; Tue, 16 Dec 2014 10:38:32 +0000 Received: from mail-ob0-f179.google.com ([209.85.214.179]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Y0pWM-0002bq-5i for lng-odp@lists.linaro.org; Tue, 16 Dec 2014 10:38:26 +0000 Received: by mail-ob0-f179.google.com with SMTP id va2so22417199obc.10 for ; Tue, 16 Dec 2014 02:38:20 -0800 (PST) X-Received: by 10.182.205.164 with SMTP id lh4mr2199743obc.5.1418726300787; Tue, 16 Dec 2014 02:38:20 -0800 (PST) Received: from localhost.localdomain (cpe-24-28-70-239.austin.res.rr.com. [24.28.70.239]) by mx.google.com with ESMTPSA id mm2sm131007oeb.17.2014.12.16.02.38.20 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 16 Dec 2014 02:38:20 -0800 (PST) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Tue, 16 Dec 2014 04:38:13 -0600 Message-Id: <1418726293-12668-1-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 1.8.3.2 X-Topics: patch Subject: [lng-odp] [PATCH] Return correct error code if suplied shm can't contain requested pool X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: bill.fischofer@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Fixes Bug #1002 Signed-off-by: Bill Fischofer --- platform/linux-generic/odp_buffer_pool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/linux-generic/odp_buffer_pool.c b/platform/linux-generic/odp_buffer_pool.c index e947dde..4c8b037 100644 --- a/platform/linux-generic/odp_buffer_pool.c +++ b/platform/linux-generic/odp_buffer_pool.c @@ -234,7 +234,7 @@ odp_buffer_pool_t odp_buffer_pool_create(const char *name, ODP_PAGE_SIZE, 0); if (shm == ODP_SHM_INVALID) { POOL_UNLOCK(&pool->s.lock); - return ODP_BUFFER_INVALID; + return ODP_BUFFER_POOL_INVALID; } pool->s.pool_base_addr = odp_shm_addr(shm); } else {