From patchwork Tue Jun 23 09:01:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tiezhu Yang X-Patchwork-Id: 11620111 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 143F96C1 for ; Tue, 23 Jun 2020 09:02:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 078E520723 for ; Tue, 23 Jun 2020 09:02:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732005AbgFWJCE (ORCPT ); Tue, 23 Jun 2020 05:02:04 -0400 Received: from mail.loongson.cn ([114.242.206.163]:43606 "EHLO loongson.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731852AbgFWJCE (ORCPT ); Tue, 23 Jun 2020 05:02:04 -0400 Received: from linux.localdomain (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9Dx_2r7xPFer7FIAA--.12008S2; Tue, 23 Jun 2020 17:01:47 +0800 (CST) From: Tiezhu Yang To: Thomas Gleixner , Jason Cooper , Marc Zyngier , Rob Herring Cc: Guo Ren , Baruch Siach , Huacai Chen , Jiaxun Yang , Tony Lindgren , Paul Walmsley , Palmer Dabbelt , Albert Ou , Kukjin Kim , Krzysztof Kozlowski , Michal Simek , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-mips@vger.kernel.org, Xuefeng Li Subject: [PATCH 0/7 RESEND] Fix potential resource leaks and do some code cleanups about irqchip Date: Tue, 23 Jun 2020 17:01:40 +0800 Message-Id: <1592902907-5062-1-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 X-CM-TRANSID: AQAAf9Dx_2r7xPFer7FIAA--.12008S2 X-Coremail-Antispam: 1UD129KBjvJXoW7KF48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Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org [git send-email failed, so resend it, sorry for that] When I test the irqchip code of Loongson, I read the related code of other chips in drivers/irqchip and I find some potential resource leaks in the error path, I think it is better to fix them. Additionally, do some code cleanups about Loongson to make it more clean and readable. Tiezhu Yang (7): irqchip: Fix potential resource leaks irqchip/loongson-htpic: Remove redundant kfree operation irqchip/loongson-htvec: Check return value of irq_domain_translate_onecell() irqchip/loongson-pch-pic: Check return value of irq_domain_translate_twocell() irqchip/loongson-pch-msi: Remove unneeded variable irqchip/loongson-htpic: Remove unneeded select of I8259 dt-bindings: interrupt-controller: Fix typos in loongson,liointc.yaml .../interrupt-controller/loongson,liointc.yaml | 4 ++-- drivers/irqchip/Kconfig | 1 - drivers/irqchip/irq-ath79-misc.c | 3 +++ drivers/irqchip/irq-csky-apb-intc.c | 3 +++ drivers/irqchip/irq-csky-mpintc.c | 26 +++++++++++++++++----- drivers/irqchip/irq-davinci-aintc.c | 17 ++++++++++---- drivers/irqchip/irq-davinci-cp-intc.c | 17 +++++++++++--- drivers/irqchip/irq-digicolor.c | 4 ++++ drivers/irqchip/irq-dw-apb-ictl.c | 11 ++++++--- drivers/irqchip/irq-loongson-htpic.c | 6 ++--- drivers/irqchip/irq-loongson-htvec.c | 10 +++++++-- drivers/irqchip/irq-loongson-pch-msi.c | 7 +----- drivers/irqchip/irq-loongson-pch-pic.c | 15 ++++++++----- drivers/irqchip/irq-ls1x.c | 4 +++- drivers/irqchip/irq-mscc-ocelot.c | 6 +++-- drivers/irqchip/irq-nvic.c | 2 ++ drivers/irqchip/irq-omap-intc.c | 4 +++- drivers/irqchip/irq-riscv-intc.c | 1 + drivers/irqchip/irq-s3c24xx.c | 20 ++++++++++++----- drivers/irqchip/irq-xilinx-intc.c | 1 + 20 files changed, 116 insertions(+), 46 deletions(-)