From patchwork Mon Jul 26 18:52:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 12400597 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,MIME_HEADER_CTYPE_ONLY, MIME_NO_TEXT,SPF_HELO_NONE,SPF_PASS,T_TVD_MIME_NO_HEADERS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2BCFC432BE for ; Mon, 26 Jul 2021 18:53:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BB4E960F6F for ; Mon, 26 Jul 2021 18:53:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231921AbhGZSNA (ORCPT ); Mon, 26 Jul 2021 14:13:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231879AbhGZSM6 (ORCPT ); Mon, 26 Jul 2021 14:12:58 -0400 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3A6AC061757 for ; Mon, 26 Jul 2021 11:53:26 -0700 (PDT) Received: by mail-pj1-x1034.google.com with SMTP id mz5-20020a17090b3785b0290176ecf64922so286620pjb.3 for ; Mon, 26 Jul 2021 11:53:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id; bh=t0+w+pgflSAZLpMZr+lDK0TAwAzf8CRYn0FjLBpRZc0=; b=cwoOcmtgWZW5u2oZIR9MSoY2buZfFnvao4lwnEQYwfuRaFGWjRa2dtH4CVLeuq6Agq swDaUz3A2MBy07dvvhy/Jm4nh9/L8V/jM2Yr/XSr1fYxviCbvKgj/jwUWcFvknFJxnVk nr6gTP8JG2vBuoxKMCEnnYf3SBbmnMJV+s//0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=t0+w+pgflSAZLpMZr+lDK0TAwAzf8CRYn0FjLBpRZc0=; b=mletz9XjoT1uHJPj9DJs3Xrkv5T9gjsDOgIFof6qL2szCOOYEd159ARmBWG/UU5UbQ kpSLIdrfWixo+KJ1ed5n66EO8kVxniWitpEvETuvAFrdoFzdrI4ustsMsgmumJvycolg rfEuhVP4SRDFNt5HDWXtJWRNxlxaV3Y928OklntKtVMMDjphZ/TORKqU52oORWNrrn4O 8z9NDuVd0ci5aqU3M5FRtJYhKpOGesQWPzKEWJ0kTFIKoDn4r/bJs52tLIrbTG2U2RDv 5ES9OUbFfPa/YyC31ZL2SkQy11FzjbXXkFvH2LGsMTGMo5TLLDnFETgPPerQKE08WgHS AZJg== X-Gm-Message-State: AOAM530MtadN5Im4U13dNlKV5wLdWqybtYLWjuQaGASBt1vjq4hgM/dJ UtTa0/3mk5ZbIJi2zAAzHLB3Yg== X-Google-Smtp-Source: ABdhPJxjpgXFL66P2Em2P2g6517gYTkeN98lNMDqHLGc/MneN0Lb6kTaxYNju1hmQnuBt2MMRVWSZg== X-Received: by 2002:a17:90a:5141:: with SMTP id k1mr355224pjm.185.1627325605554; Mon, 26 Jul 2021 11:53:25 -0700 (PDT) Received: from localhost.swdvt.lab.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id x18sm762890pfh.48.2021.07.26.11.53.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Jul 2021 11:53:24 -0700 (PDT) From: Michael Chan To: davem@davemloft.net Cc: netdev@vger.kernel.org, kuba@kernel.org, gospo@broadcom.com, dan.carpenter@oracle.com, Somnath Kotur Subject: [PATCH net] bnxt_en: Fix static checker warning in bnxt_fw_reset_task() Date: Mon, 26 Jul 2021 14:52:48 -0400 Message-Id: <1627325568-9135-1-git-send-email-michael.chan@broadcom.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Somnath Kotur Now that we return when bnxt_open() fails in bnxt_fw_reset_task(), there is no need to check for 'rc' value again before invoking bnxt_reenable_sriov(). Fixes: 3958b1da725a ("bnxt_en: fix error path of FW reset") Reported-by: Dan Carpenter Signed-off-by: Somnath Kotur Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 4db162cee911..89606587b156 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -12131,9 +12131,8 @@ static void bnxt_fw_reset_task(struct work_struct *work) /* Make sure fw_reset_state is 0 before clearing the flag */ smp_mb__before_atomic(); clear_bit(BNXT_STATE_IN_FW_RESET, &bp->state); - bnxt_ulp_start(bp, rc); - if (!rc) - bnxt_reenable_sriov(bp); + bnxt_ulp_start(bp, 0); + bnxt_reenable_sriov(bp); bnxt_vf_reps_alloc(bp); bnxt_vf_reps_open(bp); bnxt_dl_health_recovery_done(bp);