Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2605104ybe; Thu, 12 Sep 2019 11:59:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqwniyFVvvdBQtdvoWXEUlmP36HT0goVeADELzC3SlMwm78F+fhWL4/O4DPGdNnjrY3Rvnvr X-Received: by 2002:a05:6402:2ca:: with SMTP id b10mr607909edx.13.1568314775589; Thu, 12 Sep 2019 11:59:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568314775; cv=none; d=google.com; s=arc-20160816; b=NiVAcfRu3ipEo4Ngndo0FuFrl9quKTIkJIxcmLYJQyZDe5BaxrZHIH5XjitAf2dCZ0 KOedJiGCECi5/oP5RQS1L1bA5qNwowbMkmifqdO6K9ZzObmu5ZGoNoXSo64HsV9NuWZJ Zh+zWE2aAy5ydfT/GE2CA852mUL3B+nCjDqUlk1Qo1kom2kG5zY+ssVTdCHZwDET38uI mbxpVqcduIbGdEJtHqZnZ+NRyvMrYEjdZno9Tvs4/evnP2aDMsdCZU9HYCuTzZRPYThH wHXJYIbN8uORMryXCbynIsCQL+nITfFK4QogHgUkqokZ3buWf0ItY8U5tNhY3sCO0ETN GM9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=OmvmdwRBIZM6VPB73YtdtiUajIB6Rgr4joliCml5BdA=; b=zkAJKhYb2x4OG9U30uufho7lPW7rmY4cLslgMUBBYO+53dd3w5jn72rSD328aI65f9 +Zl+DNVQNwMJkr4KQjmNhqTwkpS9B8YGYsjU4Om5NcSZaj4uvtaNLFpEzFDask0mvl/6 gGv5VtD9BTA44zQk+MpsASpD+rnYsXAcmOWug49Q9DVzesVZIKW1LVu3Az0rKKY8gO2Z QYW3WlRriZjfqLZ8wzukzlvzkeKF5FgvuKP5nBLwd/NAcKeOCKEyCV7S6H944AqaCjvY r6vHPW+QlYYjElZzfw+LugguvSylbY5aXeMs3HAeeTO0FqvldQxkjyiVObb7e0Ro+IiI uZCA== 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 h11si2601554edq.126.2019.09.12.11.59.12; Thu, 12 Sep 2019 11:59:35 -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 S1731014AbfILRCJ (ORCPT + 99 others); Thu, 12 Sep 2019 13:02:09 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:40150 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730583AbfILRCI (ORCPT ); Thu, 12 Sep 2019 13:02:08 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 71FFFFE284DD2F055170; Fri, 13 Sep 2019 01:02:05 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.439.0; Fri, 13 Sep 2019 01:02:04 +0800 From: zhong jiang To: , CC: , Subject: [PATCH] net/mlx5: Remove unneeded variable in mlx5_unload_one Date: Fri, 13 Sep 2019 00:59:02 +0800 Message-ID: <1568307542-43797-1-git-send-email-zhongjiang@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org mlx5_unload_one do not need local variable to store different value, Hence just remove it. Signed-off-by: zhong jiang --- drivers/net/ethernet/mellanox/mlx5/core/main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c index 9648c22..c39bb37 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c @@ -1228,8 +1228,6 @@ static int mlx5_load_one(struct mlx5_core_dev *dev, bool boot) static int mlx5_unload_one(struct mlx5_core_dev *dev, bool cleanup) { - int err = 0; - if (cleanup) { mlx5_unregister_device(dev); mlx5_drain_health_wq(dev); @@ -1257,7 +1255,7 @@ static int mlx5_unload_one(struct mlx5_core_dev *dev, bool cleanup) mlx5_function_teardown(dev, cleanup); out: mutex_unlock(&dev->intf_state_mutex); - return err; + return 0; } static int mlx5_mdev_init(struct mlx5_core_dev *dev, int profile_idx) -- 1.7.12.4