From patchwork Mon Sep 5 13:36:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuval Shaia X-Patchwork-Id: 9313959 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 30C0160760 for ; Mon, 5 Sep 2016 13:36:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21D6C28AAC for ; Mon, 5 Sep 2016 13:36:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1379E28AB1; Mon, 5 Sep 2016 13:36:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9453928AAC for ; Mon, 5 Sep 2016 13:36:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933825AbcIENgv (ORCPT ); Mon, 5 Sep 2016 09:36:51 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:19606 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933642AbcIENgt (ORCPT ); Mon, 5 Sep 2016 09:36:49 -0400 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u85DakXF004975 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 5 Sep 2016 13:36:46 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u85DajGP019035 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 5 Sep 2016 13:36:45 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u85DaiE1026992; Mon, 5 Sep 2016 13:36:45 GMT Received: from yuval-lap.uk.oracle.com (/10.175.255.9) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 05 Sep 2016 06:36:44 -0700 From: Yuval Shaia To: yuval.shaia@oracle.com, sean.hefty@intel.com, linux-rdma@vger.kernel.org Subject: [PATCH 1/5] ibacm: Check umad_init return value Date: Mon, 5 Sep 2016 16:36:41 +0300 Message-Id: <1473082601-15887-1-git-send-email-yuval.shaia@oracle.com> X-Mailer: git-send-email 1.8.3.1 X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Yuval Shaia --- src/acm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/acm.c b/src/acm.c index f6191bd..ab1269f 100644 --- a/src/acm.c +++ b/src/acm.c @@ -3117,7 +3117,11 @@ int CDECL_FUNC main(int argc, char **argv) for (i = 0; i < ACM_MAX_COUNTER; i++) atomic_init(&counter[i]); - umad_init(); + if (umad_init() != 0) { + acm_log(0, "ERROR - fail to initialize umad\n"); + return -1; + } + if (acm_open_providers()) { acm_log(0, "ERROR - unable to open any providers\n"); return -1;