Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2655863ybh; Fri, 24 Jul 2020 20:06:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7/tPju9z8FX/vAgs0O1U5D/FGYsOsv9MI/Sq+S3PrPSdOJv1dDI9K/X80XATPIsCfWoy0 X-Received: by 2002:a50:ee07:: with SMTP id g7mr12038253eds.320.1595646363263; Fri, 24 Jul 2020 20:06:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595646363; cv=none; d=google.com; s=arc-20160816; b=tnaX3xOHuDX9ixtpfJzkkcPCbchaBT0e23i45sJSt7t6tk1Q9NMEy57YpN78vjtPEl YFYobsfgZcHWGZWfUreSQw2Rm3NF85JN+UKI6R1hAHmWesm8qR7m2ucSkysOsI6VgQDp RJY6qbcTe1OuBdomGumUxa4aGKuGlvttv9YxlWPnjiDsafjAe3XU9dWwVBDzwz7w6SRZ OL/hzG/Ta3Mnh/fi34/HyqmpeoPDWlBTN+DxMOwrduF8RNFItwIKe/TTOQ8AMDNIiPL/ 2vZn28SzwEiDv043MwgiJXO6DHYpqHbBXefJ6Z/RtkTfmCFIJirxgYZfgVcPfnLZ6R4M GoJQ== 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=xiITdRr8KZbl/mil97wcMGkHqiBvYV7WCMugdIwkda4=; b=NbVj2TyB26aG9vPri59M2sdfmhnZ+fHh+RrXeCb7RNrcvGthZm/5kjq02WpRx1P0En mPmSGJDQWlagTon1FQkfSTHq4fap3sZQHI3KMkBxGhkx34KQJBxATW7tMHwiB3ex6IPt uT9XzYblZe5W2FVkogEswvBQGv2dYyISQPjyDprVnk8gbiPXDSZ4exjvXiNXnUs0Aj7D 51z9rby84wBj1C8Ccx0gqHjK8/pEJGi8kU95zvdehqoGLQ4MRB9kwVuv1sq+1aqM0QsS 6zPO1XZhkA4NYOIuqZD5iP/nr+TPFj8z3asKJkAkraFalaTM12E7HfOnQ3hAVuedSJFI jchg== 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 i2si1607604edn.115.2020.07.24.20.05.39; Fri, 24 Jul 2020 20:06:03 -0700 (PDT) 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 S1726878AbgGYDFZ (ORCPT + 99 others); Fri, 24 Jul 2020 23:05:25 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:42138 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726572AbgGYDFY (ORCPT ); Fri, 24 Jul 2020 23:05:24 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id B1F0FFCE756F0518781A; Sat, 25 Jul 2020 11:05:20 +0800 (CST) Received: from huawei.com (10.175.104.57) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.487.0; Sat, 25 Jul 2020 11:05:07 +0800 From: Li Heng To: , , CC: , , Subject: [PATCH] svc: add missed destroy_workqueue when gb_svc_create fails Date: Sat, 25 Jul 2020 11:06:37 +0800 Message-ID: <1595646397-53868-1-git-send-email-liheng40@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.104.57] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org destroy_workqueue() should be called to destroy svc->wq when gb_svc_create() init resources fails. Fixes: 8465def499c7 ("staging: greybus: move the greybus core to drivers/greybus") Reported-by: Hulk Robot Signed-off-by: Li Heng --- drivers/greybus/svc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/greybus/svc.c b/drivers/greybus/svc.c index ce7740e..38f858f 100644 --- a/drivers/greybus/svc.c +++ b/drivers/greybus/svc.c @@ -1340,6 +1340,7 @@ struct gb_svc *gb_svc_create(struct gb_host_device *hd) err_put_device: put_device(&svc->dev); + destroy_workqueue(svc->wq); return NULL; } -- 2.7.4