From patchwork Fri Apr 29 16:03:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 66958 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp871277qge; Fri, 29 Apr 2016 09:03:38 -0700 (PDT) X-Received: by 10.50.96.201 with SMTP id du9mr5322792igb.56.1461945818888; Fri, 29 Apr 2016 09:03:38 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id si17si5912822igc.12.2016.04.29.09.03.38; Fri, 29 Apr 2016 09:03:38 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 2707A615FC; Fri, 29 Apr 2016 16:03:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 291B66157E; Fri, 29 Apr 2016 16:03:34 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 40F69615DF; Fri, 29 Apr 2016 16:03:27 +0000 (UTC) Received: from mail-lf0-f52.google.com (mail-lf0-f52.google.com [209.85.215.52]) by lists.linaro.org (Postfix) with ESMTPS id F118B610BC for ; Fri, 29 Apr 2016 16:03:25 +0000 (UTC) Received: by mail-lf0-f52.google.com with SMTP id j11so140012352lfb.1 for ; Fri, 29 Apr 2016 09:03:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=DcdPQIR23fOTBmnYdOvT+lNkhYvIGYhUQioXQm75r4I=; b=YTBl5bYLtruUKjMiu3mB/z4BeV4BQnC9P0wdDvwRJXlKonuQrTn1oNlqJtUNT9vIB+ iqooyv8UJgYzxbb31Q8Nql2Z/EzcwCRujYFfhvfPFc+HnAHWsGYgiYHhKmHvvQr/IVdq +ZLKBpMjg3kjRL18oO2HTQvCb7kKIYBX6zgXt0F4e1NfoFF2a7/F8J/SoAO0pCF3tqdH rdXuGzXaKdRKUCbO+Gt/Z9qmL0Rkp6Bi3eHBwVhonR4iMnp1BkeURcx8S3xPJf2ZhqSj b2DkX5/Bn8JDaVU2arg1S3N3n5Cb3rzaEsnWg4pTddLu0O1XHgVJqMYmLx1RVFaTiF9F JmbQ== X-Gm-Message-State: AOPr4FWcjKFl2TBnDHkc608d2blguzHSmhFKD/F3mopFfZZ5iLQSL9+dDMWHsOiWlkISTRqvKOM= X-Received: by 10.25.143.16 with SMTP id r16mr9325147lfd.59.1461945804193; Fri, 29 Apr 2016 09:03:24 -0700 (PDT) Received: from localhost.localdomain (ppp91-77-173-31.pppoe.mtu-net.ru. [91.77.173.31]) by smtp.gmail.com with ESMTPSA id zw6sm2423760lbb.14.2016.04.29.09.03.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Apr 2016 09:03:23 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Fri, 29 Apr 2016 19:03:19 +0300 Message-Id: <1461945799-20151-1-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 2.7.1.250.gff4ea60 X-Topics: timers patch Subject: [lng-odp] [PATCH] linux-generic: timer fix odp_timer_pool_create return code X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" 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" Accodring to API return code for fail case is ODP_TIMER_POOL_INVALID and errno set. https://bugs.linaro.org/show_bug.cgi?id=2139 Signed-off-by: Maxim Uvarov --- platform/linux-generic/odp_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/linux-generic/odp_timer.c b/platform/linux-generic/odp_timer.c index ac72709..29383b1 100644 --- a/platform/linux-generic/odp_timer.c +++ b/platform/linux-generic/odp_timer.c @@ -787,7 +787,7 @@ odp_timer_pool_create(const char *name, /* Verify that we have a valid (non-zero) timer resolution */ if (param->res_ns == 0) { __odp_errno = EINVAL; - return NULL; + return ODP_TIMER_POOL_INVALID; } odp_timer_pool_t tp = odp_timer_pool_new(name, param); return tp;