Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp2335674pxb; Sun, 15 Nov 2020 00:32:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJykDqgAgrrxN8Gv3qRnAG0JZ8TZRi1h4JoaOaiBf0JAVxSgHjLAvX0XzzFu49OSo/lDBwM/ X-Received: by 2002:a17:906:c0c1:: with SMTP id bn1mr9394426ejb.454.1605429151500; Sun, 15 Nov 2020 00:32:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605429151; cv=none; d=google.com; s=arc-20160816; b=akaoJG/lOvy8W/Lts+emsEa6YIdM6f7x+WPPh5/wlfoF7HOst+xIiRv2cIDJxzd4lr s/RfxFzd2yHxAl5Da+I1QKEWi7VN6FLYiRwjlRMwfku1ctJCfilx9lhS/YgtKuKaQKSS vwRApb3imaOhu4b5j4bwSsBOCJ7GA31FQt68aTJgieT2Bmi9Dgsdd21Yf8xZceI/59eh 3hK+5imCSsnG/YFjWvi4HInv4NYM9S4psWoKM+aiLJCikNYE/uwvfFT3YaC/UBOJYzfA N+yPvZFiw4SqeyJDPvSP5nvfTcAnYxnySs+aZgbJVh/PEfM0SwIPci3o3KNk1l6zpM6y RukQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=G6ek+P088m20xeihfslqyvaKtiyJ9suDaZTCcTiElcE=; b=dAQx0tMY/00wtQzE1o9QtOYAfJ+WRN5a4wnRDmyzf0YIjFndzSfLN9tjotzM9WswgG CSb+5s1M2QiGfsQnwMWzR5sbWtml5x6GXzIVahXjsJI+aFJDw5wsU1urdNXNYnM4PUJV Vcfjf5RP6b3LdbcteGvEiHK8gC7IW3Q2aQvz9lHMBD67TbWCJQ+tmtLNzGgeWp9WNTRC uU+oLFBlHvwaSTopvXU8TVHUFw8Fj9vuYs9SpEImCcdF3u/fG3XtKTE40gCnrt7vC8+F HFFlDbPro5jxGkrM1DftY5Ce6iadecsgr3Lix3sZv1BB/ADfLQYfpqsTPqizPsLCPAT8 CP4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dm25si9120678edb.238.2020.11.15.00.32.08; Sun, 15 Nov 2020 00:32:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726732AbgKOI0K (ORCPT + 99 others); Sun, 15 Nov 2020 03:26:10 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:7240 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726230AbgKOI0K (ORCPT ); Sun, 15 Nov 2020 03:26:10 -0500 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4CYldk0YLlzkY8Q; Sun, 15 Nov 2020 16:25:46 +0800 (CST) Received: from huawei.com (10.175.124.27) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.487.0; Sun, 15 Nov 2020 16:25:55 +0800 From: Wang ShaoBo To: CC: , , , , , Subject: [PATCH] IB/hfi1: Fix error return code in hfi1_init_dd() Date: Sun, 15 Nov 2020 16:25:48 +0800 Message-ID: <20201115082548.35793-1-bobo.shaobowang@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.124.27] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix to return the error code from hfi1_netdev_alloc() instaed of 0 in hfi1_init_dd(), as done elsewhere in this function. Fixes: 4730f4a6c6b2 ("IB/hfi1: Activate the dummy netdev") Signed-off-by: Wang ShaoBo --- drivers/infiniband/hw/hfi1/chip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/hfi1/chip.c b/drivers/infiniband/hw/hfi1/chip.c index 7eaf99538216..c87b94ea2939 100644 --- a/drivers/infiniband/hw/hfi1/chip.c +++ b/drivers/infiniband/hw/hfi1/chip.c @@ -15245,7 +15245,8 @@ int hfi1_init_dd(struct hfi1_devdata *dd) & CCE_REVISION_SW_MASK); /* alloc netdev data */ - if (hfi1_netdev_alloc(dd)) + ret = hfi1_netdev_alloc(dd); + if (ret) goto bail_cleanup; ret = set_up_context_variables(dd); -- 2.25.1