Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp13952003pxu; Mon, 4 Jan 2021 08:49:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJzuL3/MuOQrunpzmN2MGEeNozHXWm4fQClQIN3dXGls83HE100ZVYmwSBvDLP1wrNprp09C X-Received: by 2002:a17:906:f894:: with SMTP id lg20mr66766539ejb.348.1609778983322; Mon, 04 Jan 2021 08:49:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609778983; cv=none; d=google.com; s=arc-20160816; b=ENm/j6DyXHe46ZTV87d7uNQgqaW3SCS9ISlLLTRSpD0WBOJ5HbUHFha00t42YvdrFO In0HWnUjd5+t7QWACb69VsOGo2Kjba1wZalAULu441CfvW2kJ+T20XhRWn7YhYRu/O/A qf96PQVdqxGDD+47jCRx/6eDM6lnlfAc9ZSt0mB8V8xiS8OU3jYowq72KwNQVvKgdAbO ehcPR5F35dhvTLqKdQ1nL86hDUf1JtyXxha6cceCTIVmBmynPhtUs/6JDB4A85VtNsaf Jy4sW1pMKEffHYwP5DlNFVm8SrGUgK/5nefmY5F47kgpkq2Nj59JKLeloDAYISWtrOPd m7YA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=HZMaIpEwmgBLW9zmJkQwzW1sGw6PIq07hgW7iKXTwGU=; b=tJdKBIPJp9ru/g2qBbZv72xPClEI6U2GwPIbDAcA6jfbK+8MTV0wuX4XDolSnKlJE5 QiDKwmPf7Qm+U/QwbFMihfOxN/RNi64WWMVk25WKKi52XCVCEkL0qeMImp+n+QamtF6B RpP78N7yZ4qD1oK+CvIdnpCCDpFQCakjVXRJu3CTPQQVWAOm6KzA5ml1lh3Jr7BqiWnG wGgcBrG5AWB/GBMCveb2BmrqBBZX0YMvG2AC8i+SKCwt0dL0cDbDggSeF3aEZ7D+4OS0 iAqNExBtd/CDrAlan4EiXZB8k8VMiL1kqfvkpQgrN6VbXEQccf1BIDbhD5ZsskteYgb7 x/bA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zPgUPyNm; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d20si27613191eds.14.2021.01.04.08.49.20; Mon, 04 Jan 2021 08:49:43 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zPgUPyNm; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728537AbhADQBQ (ORCPT + 99 others); Mon, 4 Jan 2021 11:01:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:38422 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728523AbhADQBO (ORCPT ); Mon, 4 Jan 2021 11:01:14 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 67118224D4; Mon, 4 Jan 2021 16:00:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609776033; bh=RfDIi+ld6PVLeo0NMQXjKVHQtzypeNuRJnbtIICYHuI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zPgUPyNmVf91RRCxOW0wwHI43tfURk4egiPLGugA6tcU/D0Wx4gkyWZsRVWwJ+pE4 y+QsbM/1y1R/NJwB97Ya700hkyz10F9rrPU3NIQUhxk2nrqf+hygTC8FboBlRNqNwY AlTS8qLlnsEVvPzygeLkG7uGTaj+F1rhaW5aIziM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Qinglang Miao , Boris Brezillon , Sasha Levin Subject: [PATCH 5.4 39/47] i3c master: fix missing destroy_workqueue() on error in i3c_master_register Date: Mon, 4 Jan 2021 16:57:38 +0100 Message-Id: <20210104155707.622173155@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210104155705.740576914@linuxfoundation.org> References: <20210104155705.740576914@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Qinglang Miao [ Upstream commit 59165d16c699182b86b5c65181013f1fd88feb62 ] Add the missing destroy_workqueue() before return from i3c_master_register in the error handling case. Signed-off-by: Qinglang Miao Signed-off-by: Boris Brezillon Link: https://lore.kernel.org/linux-i3c/20201028091543.136167-1-miaoqinglang@huawei.com Signed-off-by: Sasha Levin --- drivers/i3c/master.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c index 6cc71c90f85ea..19337aed9f235 100644 --- a/drivers/i3c/master.c +++ b/drivers/i3c/master.c @@ -2492,7 +2492,7 @@ int i3c_master_register(struct i3c_master_controller *master, ret = i3c_master_bus_init(master); if (ret) - goto err_put_dev; + goto err_destroy_wq; ret = device_add(&master->dev); if (ret) @@ -2523,6 +2523,9 @@ int i3c_master_register(struct i3c_master_controller *master, err_cleanup_bus: i3c_master_bus_cleanup(master); +err_destroy_wq: + destroy_workqueue(master->wq); + err_put_dev: put_device(&master->dev); -- 2.27.0