From patchwork Tue Aug 30 00:56:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: shaozhengchao X-Patchwork-Id: 12958559 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 20788ECAAD2 for ; Tue, 30 Aug 2022 00:54:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229522AbiH3AyP (ORCPT ); Mon, 29 Aug 2022 20:54:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbiH3AyN (ORCPT ); Mon, 29 Aug 2022 20:54:13 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86AE881B1C; Mon, 29 Aug 2022 17:54:11 -0700 (PDT) Received: from dggpeml500026.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MGpdM1R01zlWXW; Tue, 30 Aug 2022 08:50:47 +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; Tue, 30 Aug 2022 08:54:09 +0800 From: Zhengchao Shao To: , , , , , , , , CC: , , Subject: [PATCH net-next 0/2] net: sched: remove redundant resource cleanup when init() fails Date: Tue, 30 Aug 2022 08:56:36 +0800 Message-ID: <20220830005638.276584-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: dggems703-chm.china.huawei.com (10.3.19.180) 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 | 17 ++++------------- net/sched/sch_htb.c | 36 +++++++++--------------------------- 2 files changed, 13 insertions(+), 40 deletions(-)