Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3062915pxb; Mon, 9 Nov 2020 01:12:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJw7tYQlXMZlCCTHMpxsSGD7eleVcpcr9sSH2dVIXNA91tZPc+55fl1jwNtAPedduD3/5sNZ X-Received: by 2002:a17:906:ca93:: with SMTP id js19mr14852125ejb.537.1604913126434; Mon, 09 Nov 2020 01:12:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604913126; cv=none; d=google.com; s=arc-20160816; b=JI6AbpsKr4w+4rNP5VPhAAdpEZt5NMaWJgU9PJP4WCFvdZ+GschrIDnrdg7HzPRLYp jIIveR7U+Om1GJmPtnUoB51FfuC6IhsXOk1wLHr7Og2uKU1TExbzLHq1eQGNa116LKRr PdQWVsB1lotgtbulRqCswqSCnMOueaRQ4VUflwQVB9gRV+BokJvHGf2Kd9jTXdcdFcQ8 Tn3LC912L6bJ/PxK2igJG3K7mT3xc8G09OUkEz8q6oRh2dvlOerV6+PjjXlZvQirKrd+ 9Pk713axFNRopDMxzDyiNpH3hF3b4lJGM3t23rQsnzoZTh+AFb+YbnAG/jRRN5LmaTQc XdTQ== 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=tE47c+Z2w73xBCwzbkripL2uHJnLfhdWxD9EHfTnd/o=; b=fus/H2wvuhgzpS7TOVsFcDSrz8g3c7zbXv9PZ5bK3oOhdiDiJq7bDvYai7UtKPH7BC lcFcBsIIX1nMTtqb/3COCN28obd7RZI8qSJ6u5zyTVk7cbtQWa3OykfISdnlWgoW8+Jc tJ+1HV+jXKoDTP+a2M9jXwJc0SdKOyo2ANjf1YblHSp2E3fqI8XdHgCzwwB/0v/2Ktjg D+/Xam7r+iVVkZZiPtMVPwEXZsM/pHuzpMn49zvFvJoX08H9xKVSpKLMRdWQ19btzmya N7DtYL4E717Q7IY0ms2m45xzCn0m2+yuGx/TzRVpMkRD3zs8xsxFeybTqOgD4MEmOHEu /5jw== 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 a18si7042776edb.306.2020.11.09.01.11.43; Mon, 09 Nov 2020 01:12:06 -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 S1729921AbgKIJKQ (ORCPT + 99 others); Mon, 9 Nov 2020 04:10:16 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:7158 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727791AbgKIJKP (ORCPT ); Mon, 9 Nov 2020 04:10:15 -0500 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4CV4vd5l9vz15RwB; Mon, 9 Nov 2020 17:10:05 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.487.0; Mon, 9 Nov 2020 17:10:05 +0800 From: Qinglang Miao To: Alim Akhtar , Avri Altman , "James E.J. Bottomley" , "Martin K. Petersen" CC: , , "Qinglang Miao" Subject: [PATCH] scsi: ufshcd: fix missing destroy_workqueue() on error in ufshcd_init Date: Mon, 9 Nov 2020 17:15:22 +0800 Message-ID: <20201109091522.55989-1-miaoqinglang@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the missing destroy_workqueue() before return from ufshcd_init in the error handling case. It seems that exit_gating is an appropriate place. Fixes: 4db7a2360597 ("scsi: ufs: Fix concurrency of error handler and other error recovery paths") Signed-off-by: Qinglang Miao --- drivers/scsi/ufs/ufshcd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index b8f573a02713..9eaa0eaca374 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -9206,6 +9206,7 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq) exit_gating: ufshcd_exit_clk_scaling(hba); ufshcd_exit_clk_gating(hba); + destroy_workqueue(hba->eh_wq); out_disable: hba->is_irq_enabled = false; ufshcd_hba_exit(hba); -- 2.23.0