From patchwork Fri Sep 2 08:34:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: shaozhengchao X-Patchwork-Id: 12963816 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85AF2C6FA81 for ; Fri, 2 Sep 2022 08:32:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235634AbiIBIcS (ORCPT ); Fri, 2 Sep 2022 04:32:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235410AbiIBIcN (ORCPT ); Fri, 2 Sep 2022 04:32:13 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A5FFC0E4F; Fri, 2 Sep 2022 01:32:12 -0700 (PDT) Received: from dggpeml500026.china.huawei.com (unknown [172.30.72.57]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4MJrf45GRWz1N7mH; Fri, 2 Sep 2022 16:28:28 +0800 (CST) Received: from huawei.com (10.175.101.6) by dggpeml500026.china.huawei.com (7.185.36.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 2 Sep 2022 16:32:09 +0800 From: Zhengchao Shao To: , , , , , , , , CC: , , Subject: [PATCH net-next,v2 0/2] net: sched: remove redundant resource cleanup when init() fails Date: Fri, 2 Sep 2022 16:34:28 +0800 Message-ID: <20220902083430.24378-1-shaozhengchao@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.175.101.6] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpeml500026.china.huawei.com (7.185.36.106) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org qdisc_create() calls .init() to initialize qdisc. If the initialization fails, qdisc_create() will call .destroy() to release resources. Zhengchao Shao (2): net: sched: fq_codel: remove redundant resource cleanup in fq_codel_init() net: sched: htb: remove redundant resource cleanup in htb_init() net/sched/sch_fq_codel.c | 25 ++++++++----------------- net/sched/sch_htb.c | 36 +++++++++--------------------------- 2 files changed, 17 insertions(+), 44 deletions(-)