From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4CCDD200112 for ; Mon, 25 Aug 2025 03:55:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.190 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756094102; cv=none; b=MvYayecB+1f3e7EWnbFtAfzT16HiymRqYXUyqanJmZqljvNog5/5viO1IZwsUQhCk6uABBUSbbZdFk07N9DtVB9ZHXV8lRhvT5xKAxAfNkOrYI/Yzugv/VDtNFJn4KrgxjYKatpNN9OTFB3o7XjNEzAsnDkS6OlHCo4VNrQEatU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756094102; c=relaxed/simple; bh=28ADaYiyzUt/zv9IvBbFh9bFQMVxj9dGmD0qszY3I5M=; h=Subject:To:CC:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=M+J/xdOUyXuJfVfAl9kVln7SADHhlVb5YbmcLhA52bl9e+emjFqwE/iW8uKSgEmksDMmchoWNi3PepsPhZr1MSW8g4RWu0oavjvmmQ6+/9/M+yqQuf8bJ3FOR1e0ZRPOJAKPOr+O1Y/iC/wBDKFVEACr7BHl1ZyAJDkazoL++YQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.190 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.234]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4c9H0y53Pnz2VRQl; Mon, 25 Aug 2025 11:52:02 +0800 (CST) Received: from kwepemk200017.china.huawei.com (unknown [7.202.194.83]) by mail.maildlp.com (Postfix) with ESMTPS id D8980140276; Mon, 25 Aug 2025 11:54:57 +0800 (CST) Received: from [10.174.178.219] (10.174.178.219) by kwepemk200017.china.huawei.com (7.202.194.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 25 Aug 2025 11:54:57 +0800 Subject: Re: [PATCH v2 3/3] irqchip/gic-v5: Fix error handling in gicv5_its_irq_domain_alloc() To: Dan Carpenter CC: Lorenzo Pieralisi , Marc Zyngier , Thomas Gleixner , Sascha Bischoff , Timothy Hayes , , References: From: Zenghui Yu Message-ID: Date: Mon, 25 Aug 2025 11:54:56 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: kwepems100002.china.huawei.com (7.221.188.206) To kwepemk200017.china.huawei.com (7.202.194.83) On 2025/7/18 2:45, Dan Carpenter wrote: > There are two issues to fix in this code: > 1) If gicv5_alloc_lpi() fails the original code was checking the wrong > variable. Fix the mixup between "ret" and "lpi". > 2) Clean up from all the previous iterations and not just the current > iteration. > > Fixes: 57d72196dfc8 ("irqchip/gic-v5: Add GICv5 ITS support") > Signed-off-by: Dan Carpenter > --- > v2: In v1 I had the wrong goto if gicv5_alloc_lpi() failed. Also change > the label name from out_free_lpi to out_free_irqs. > > drivers/irqchip/irq-gic-v5-its.c | 20 ++++++++++++++------ > 1 file changed, 14 insertions(+), 6 deletions(-) Reviewed-by: Zenghui Yu