Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp940325imm; Tue, 15 May 2018 11:22:07 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo7elN2EFDXzj5pCqSIIWfmVeWkJYzfBjBr7+67VNH58tVheS+VNTXekXKS/QsvM0qNm7SR X-Received: by 2002:a65:4805:: with SMTP id h5-v6mr12953652pgs.96.1526408527103; Tue, 15 May 2018 11:22:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526408527; cv=none; d=google.com; s=arc-20160816; b=T18aJ6+M9HdXDwEdZNiq4E10WOcGsKnlgCuPZGpq6qV573cGv3SlH6dOYywcdE480v CQQAF64vcxINxfnk1zV1YQK71iBYvJHJbffJc0SRpbTelqVSfS+zJ0n9f4Y35prj6f9y c8FsUepfqZCg6AnzQvOUkE/h4NKMVX+diT2E2rFD0FF2BSEzKNXtak4XjWPh2Qv23y62 uV9hf3m4msVRaFkvdZFlrApC+3gfuvAeabhqUsTInry6o3bC5/9IYqN6QWCRnIlIWzgC V8cNIbFLZMw+g/MthWtkvu128WHyCz+5WzZ8ppD0KbKA05R/pgfcpqETR0Q7/oSTAafy 8X8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=Se4cTjiZyYDQx20AszUxuAZxQnm9gwyofM35OV/MjPw=; b=ZYlDwKZV9jsT+ZafQTSR5q1uFyZQ9L2SUEhclyzBfWOoSSL4A5j/0YcMwqPkj2N1MY MhbXyuX3BU8pcaqVWM6rnb+jCBisl2fwapEObBG2w6h7DDdN7zVltqRtMqE5gJXy8VZ5 JvyKAzy3VyCfQ63fcKPhU8as7ZULRclwvlgTba6nJ8f9CmX/V4GZtB9b4XUNB9xwvEmy H5H67ebrT16SuvN9UvcwUH3lHKkwJ5jlsNPhSAz5UacYZOra1b3Z3ysKepwgUvVVdr9j DLjwTvCXRJP3AKVnMfM5sGb7+3zMAW8Gi+atlwQKXkNFn3Fmkz9nKv9NtGtFCBgI2pWN 0ydw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e8-v6si460383pgt.185.2018.05.15.11.21.52; Tue, 15 May 2018 11:22:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753473AbeEOSVZ (ORCPT + 99 others); Tue, 15 May 2018 14:21:25 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:59893 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751859AbeEOSVV (ORCPT ); Tue, 15 May 2018 14:21:21 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 12D1134A6D796; Wed, 16 May 2018 02:21:17 +0800 (CST) Received: from S00293818-DELL1.china.huawei.com (10.202.227.234) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.382.0; Wed, 16 May 2018 02:21:13 +0800 From: Salil Mehta To: CC: , , , , , , , Fuyun Liang Subject: [PATCH net-next 06/10] net: hns3: Change return value in hnae3_register_client Date: Tue, 15 May 2018 19:20:10 +0100 Message-ID: <20180515182014.42196-7-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20180515182014.42196-1-salil.mehta@huawei.com> References: <20180515182014.42196-1-salil.mehta@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.202.227.234] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Fuyun Liang A client includes many client instance. Just like ae_algo, Initializing client instance failed does not represent registering client failed. The action of registering client just is adding client to the client list and the result always is true. This patch changes the return value of hnae3_register_client form a variable value to a fixed value, makes the function always return ok. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hnae3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.c b/drivers/net/ethernet/hisilicon/hns3/hnae3.c index 3b1c396..bd3c232 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hnae3.c +++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.c @@ -98,7 +98,7 @@ int hnae3_register_client(struct hnae3_client *client) exit: mutex_unlock(&hnae3_common_lock); - return ret; + return 0; } EXPORT_SYMBOL(hnae3_register_client); -- 2.7.4