Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp692539iob; Fri, 13 May 2022 10:18:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynBJIh0+K+qLo/KQmQRSjwgovqB/bZeMXXL1UYsBvI101FXBYqRQXUw46I95iNC0tMkBJl X-Received: by 2002:a17:907:9813:b0:6fa:78b0:9be2 with SMTP id ji19-20020a170907981300b006fa78b09be2mr5282080ejc.159.1652462281990; Fri, 13 May 2022 10:18:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652462281; cv=none; d=google.com; s=arc-20160816; b=O4Svuv49XfgPVN/+0SxcSvncx2XnGVSk/OWAFKuLzr1UIPkqFDXhKh+7HtKdNayAYu ZOs/bFnvuPjn5VDJfnb6wKCLspm+CWz5KmTkVEJTS1Azsg9m0FDgvQ1PPOPvoleNt42c 6VHYpGanTUn2rg+n1rCwxOAuPCMseT8kd4GrvIGKRc+4diIF4q254o484vuuAaNVM2+g gduV39RVHDZ91t2iFeSzEJ54hpd9FOFVryUpDNr0UbrTiH6qjzRjg4CqKQVFnnaPzYuB zMCMeN0z3Jz88VIcRPY3ZcxKcNmrfPQROwOSJG1y5a/WJFQg5uh321nfRWqX8O8i0aDd 69oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=3foh5tNyiE/B7bdVO8oqKSis6IR1d64+0kND9vN5rS0=; b=Swv34cjiqMBHAx4l1nfXS6KaTwevqX/nZwTElQmS9ic81FibiJmTudfoAN2OG2s7dr lR4tl1zsMJe+Ng8GEvJ+fE9+2LJ25e/lTJmgpaWdaXnqgUUwBRona88TWiClqYLnYfYo 5lua8pB+lh4G9yd6x7b34zTnjuqHm6zIMfXakJd/npEQRw4dstqgPNhfBb++AO7GRFsv nekUIWTiqCXbI1e/1VTcrsT61uEOzbwnUquabSN/h0TOIxbWM8jZor8yhOJj58VBg0Dd lKC/SffzGmeaZGyC7pUeiXi/3VD4OXYVaMbgc+OErvANkyBUEZK0H5TdPdz9KNS/OtMD STGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b15-20020a0564021f0f00b00423f62ce403si2553858edb.571.2022.05.13.10.17.35; Fri, 13 May 2022 10:18:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351457AbiELI2H (ORCPT + 99 others); Thu, 12 May 2022 04:28:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351438AbiELI17 (ORCPT ); Thu, 12 May 2022 04:27:59 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1064E9B18E; Thu, 12 May 2022 01:27:58 -0700 (PDT) Received: from kwepemi500015.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4KzPwL5cztzGpSV; Thu, 12 May 2022 16:25:06 +0800 (CST) Received: from huawei.com (10.175.127.227) by kwepemi500015.china.huawei.com (7.221.188.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 12 May 2022 16:27:55 +0800 From: Zheng Bin To: , , , , , CC: , Subject: [PATCH -next] net: hinic: add missing destroy_workqueue in hinic_pf_to_mgmt_init Date: Thu, 12 May 2022 16:41:48 +0800 Message-ID: <20220512084148.1027481-1-zhengbin13@huawei.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemi500015.china.huawei.com (7.221.188.92) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org hinic_pf_to_mgmt_init misses destroy_workqueue in error path, this patch fixes that. Signed-off-by: Zheng Bin --- drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c b/drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c index ebc77771f5da..4aa1f433ed24 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c @@ -643,6 +643,7 @@ int hinic_pf_to_mgmt_init(struct hinic_pf_to_mgmt *pf_to_mgmt, err = alloc_msg_buf(pf_to_mgmt); if (err) { dev_err(&pdev->dev, "Failed to allocate msg buffers\n"); + destroy_workqueue(pf_to_mgmt->workq); hinic_health_reporters_destroy(hwdev->devlink_dev); return err; } @@ -650,6 +651,7 @@ int hinic_pf_to_mgmt_init(struct hinic_pf_to_mgmt *pf_to_mgmt, err = hinic_api_cmd_init(pf_to_mgmt->cmd_chain, hwif); if (err) { dev_err(&pdev->dev, "Failed to initialize cmd chains\n"); + destroy_workqueue(pf_to_mgmt->workq); hinic_health_reporters_destroy(hwdev->devlink_dev); return err; } -- 2.31.1