From patchwork Sat Nov 26 13:34:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 26233 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp4633835wrr; Sat, 26 Nov 2022 05:35:14 -0800 (PST) X-Google-Smtp-Source: AA0mqf56owBC3RH1gh4fPfVUfMexCULST7dTf+yTIbltWCo+t3bxdr7+K2vJt+WWHf3BFXTV/5PI X-Received: by 2002:a17:90a:f489:b0:212:f516:edfb with SMTP id bx9-20020a17090af48900b00212f516edfbmr45958349pjb.156.1669469714202; Sat, 26 Nov 2022 05:35:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669469714; cv=none; d=google.com; s=arc-20160816; b=UDswCsh8XVVNbozewquoa6e5rLyHipS8ejNYLmERHAEMOkvDnCP2z33Bdnh4Cdoda4 pz+tWY0sxBkdIcLf5iD4WOarmB2qMFAfE+QrofOeDF7JfdpgZzB+ClxIBrBBkVmYP+iY zR+r6q+N5Lm/yYoozeBlvmBNVsYfb5TUjsA+V24XfFmtXqQSyUXc5vi/jZEez1I135+Q KEPMimD/d6zZdESbs4DgfZz08R3FZ6rEGpdKKkGRxLn5OqVCyDypX3gENM/d2iHO0t1C RuApbOcLr3byyBIyCUl54UWRXgs44jFYbrJusMDJ5QfgYj4SvrzcCx3WbJMeNDWqKUGZ ByAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=FApH4WYqnnPnCwRs252w67TbC7zTXDysxpl2cWjUjB8=; b=xeEPsZbzhSMpO5nB5KwxpZQWcBcL/wPR5rM2kkiJ0Ju9PndOdYGqidTH+zQWvIaOK8 wKSE6gfZ0YUNXBTvM964Rvhr9epFAK1LmfZXYNcbAvdsHMIkfHKgr6jLkgBXfizStJlz OQi1oRsP7tTG10BQ8i15q66Khpv2cffTFZuuzP1pKV3/L21HyPngrUT7RVGGT18zY2Xe PnSFsWAtSz+o/SaD7b7awOomilKa7eo+BWHsuyeae5/cQBnap4HlMyB00F1yOcLSfWcK JYUNOd+siRwo0HygH3wgmVUY1yk6gj9CQneZDfAzUIkmZFth0ay3v9/OoW1gxFSzPAlB hboQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=gLVa7yvs; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d1-20020a170903230100b001884ba979e7si7501377plh.194.2022.11.26.05.35.01; Sat, 26 Nov 2022 05:35:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=gLVa7yvs; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229595AbiKZNeh (ORCPT + 99 others); Sat, 26 Nov 2022 08:34:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229515AbiKZNec (ORCPT ); Sat, 26 Nov 2022 08:34:32 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E69D619298 for ; Sat, 26 Nov 2022 05:34:31 -0800 (PST) Date: Sat, 26 Nov 2022 13:34:29 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669469670; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FApH4WYqnnPnCwRs252w67TbC7zTXDysxpl2cWjUjB8=; b=gLVa7yvsaj2c/WZvbMLTTLm4DXCJ2D0sg1TAaB4Susl6plHC5g6GXlCVvwZcPlbTsn1ZYA P4+rhJkc+/uyLpPwjEmFriwPIte83tp6sCGF5Nx8f9hX209co0niKsu5UQg5+SzTwC62GZ fp3JOJuFQxa5jkhNo/k87BPwQjM/tdxwxvwNvNYu0HlQAUEP9iad/2TNB+KpMaKgXfI5Mq GWsQXQeIcR+XtSvN9+1eJ0Cv8yrPAP/+j3EeuUpL7BfhaiccOsE36cetPXQrPVdjsinqI4 GTrjNfxR5X1dJetxYAqkuC4mxXuMXM1x07kvofeWPRcRdu7o2qd5WYzJ/uvBnw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669469670; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FApH4WYqnnPnCwRs252w67TbC7zTXDysxpl2cWjUjB8=; b=/13bOpW6JOnt9mQ72+josj1uphNkFVP+VZ1AuJeT1ePkP/uz4gp9MlOIp7u3Q2uijNLYts jSD2qYfbvHaebyCw== From: "irqchip-bot for Wei Yongjun" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-kernel@vger.kernel.org Subject: [irqchip: irq/irqchip-next] irqchip/wpcm450: Fix memory leak in wpcm450_aic_of_init() Cc: Wei Yongjun , j.neuschaefer@gmx.net, Marc Zyngier , tglx@linutronix.de In-Reply-To: <20221115092532.1704032-1-weiyongjun@huaweicloud.com> References: <20221115092532.1704032-1-weiyongjun@huaweicloud.com> MIME-Version: 1.0 Message-ID: <166946966925.4906.3717360312262701265.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750565874892071949?= X-GMAIL-MSGID: =?utf-8?q?1750565874892071949?= The following commit has been merged into the irq/irqchip-next branch of irqchip: Commit-ID: 4208d4faf36573a507b5e5de17abe342e9276759 Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/4208d4faf36573a507b5e5de17abe342e9276759 Author: Wei Yongjun AuthorDate: Tue, 15 Nov 2022 09:25:32 Committer: Marc Zyngier CommitterDate: Sat, 26 Nov 2022 13:29:48 irqchip/wpcm450: Fix memory leak in wpcm450_aic_of_init() If of_iomap() failed, 'aic' should be freed before return. Otherwise there is a memory leak. Fixes: fead4dd49663 ("irqchip: Add driver for WPCM450 interrupt controller") Signed-off-by: Wei Yongjun Reviewed-by: Jonathan Neuschäfer Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221115092532.1704032-1-weiyongjun@huaweicloud.com --- drivers/irqchip/irq-wpcm450-aic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/irqchip/irq-wpcm450-aic.c b/drivers/irqchip/irq-wpcm450-aic.c index 0dcbeb1..91df62a 100644 --- a/drivers/irqchip/irq-wpcm450-aic.c +++ b/drivers/irqchip/irq-wpcm450-aic.c @@ -146,6 +146,7 @@ static int __init wpcm450_aic_of_init(struct device_node *node, aic->regs = of_iomap(node, 0); if (!aic->regs) { pr_err("Failed to map WPCM450 AIC registers\n"); + kfree(aic); return -ENOMEM; }