Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2933759iog; Mon, 20 Jun 2022 07:47:17 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sS1Tp23s7v3Da63Sz6KWJu9VcyeAEHuvNO5qVPLvRZ+wMIft7l8ogs1nZVndHMyaXb+6l8 X-Received: by 2002:a05:6a00:22ce:b0:51c:15ac:3977 with SMTP id f14-20020a056a0022ce00b0051c15ac3977mr24929119pfj.3.1655736437603; Mon, 20 Jun 2022 07:47:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655736437; cv=none; d=google.com; s=arc-20160816; b=JwVRpAn7tkhx4KWR1g7mjtgiqZWBDBHTLwZtdI/mpFfw4S0bsxvYVOMUB8ArGeIzqD lznYQ41jVmyXpjKyi2CPOCHG6G2hujap1RN+XCxT450QsQjO2HRjWbqxfzs4evlTe6tp O0wVdDsV13d1pOFqnd+KJvWf5N+375aBdSxSJnK/nePr/JXnSGU6aF05ViGkcdPNdd0o Hiw6FToY1o3kJ5ff0ZtQIHwL1PS1RRi/sEGmW60k71BRSMtDV/UDz/z/7WHEnQIDOcYX DEXtDwQSiw/MyJVuj0CrzO3NQZ5HCoOHg4mJAOJ8cp2C+sEGy7nkqMrZ8QdGuLBbkMSx UYQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QHZ60u2Ca2XRhwvcaoCH3iLoJbOVhLDx09nTP/k4/Yg=; b=ZQ+bnfAnu/IS2Y6tQWY/rKasyBUeYfflVO5VrULlQZ10jHlp8l43xP+elyqrpC8Ica iZVADZ/mTY0OmFtswEpJyk5Yxvgz7Ua+0hAvIllFBmg1f0kOfeXfpKpw/iT9kB8jZZ74 GJ4riKE4ZiYB9dDqETygICRH9WFhZk9mNNpu76NHtAmWcuALXBDqun1eVsm/NQS4ja1K 5iY+lj6sRbpAQZOsvHN9IRF0Bbu1LMhxunywnqkBlHKAAkyLAC6/MQg5YdizLaP1+Wfo 6o1s0fA6Qeu/XaJX4I8U+ZfS/5JA79QkoyHW8Tyl8Y+bR/bXztnOsi1lR3+RLYIPREzC UGLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KzfYTxNb; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pi14-20020a17090b1e4e00b001df458aec1bsi22904295pjb.93.2022.06.20.07.47.05; Mon, 20 Jun 2022 07:47:17 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=KzfYTxNb; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243741AbiFTNBC (ORCPT + 99 others); Mon, 20 Jun 2022 09:01:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244424AbiFTM7f (ORCPT ); Mon, 20 Jun 2022 08:59:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 513BB1CB10; Mon, 20 Jun 2022 05:56:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0C9B1614CA; Mon, 20 Jun 2022 12:56:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C061C3411B; Mon, 20 Jun 2022 12:56:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655729785; bh=jnvaKL2ylP9hoy1It4rGwhTXwZO5J+36jAw+FL5Cfcs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KzfYTxNbt2tVhybMSFjta95oT6HtqzPp/1mCzMAn9JaiEKZu6zzJ/kxx7zo45sIwk Nm3RSOjC4OFiX1HMyogITIYE1q1wAa/9u2hBDPLal0iJ4Vj+H97TADqTeMC5i7Mk7J QH/pxsD7CqpYZVA4L/OLUrHyEy5XuGLwmNX1iWYs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Chengguang Xu , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 5.18 033/141] scsi: pmcraid: Fix missing resource cleanup in error case Date: Mon, 20 Jun 2022 14:49:31 +0200 Message-Id: <20220620124730.511907555@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220620124729.509745706@linuxfoundation.org> References: <20220620124729.509745706@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: Chengguang Xu [ Upstream commit ec1e8adcbdf661c57c395bca342945f4f815add7 ] Fix missing resource cleanup (when '(--i) == 0') for error case in pmcraid_register_interrupt_handler(). Link: https://lore.kernel.org/r/20220529153456.4183738-6-cgxu519@mykernel.net Reviewed-by: Dan Carpenter Signed-off-by: Chengguang Xu Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/pmcraid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c index fd674ed1febe..6d94837c9049 100644 --- a/drivers/scsi/pmcraid.c +++ b/drivers/scsi/pmcraid.c @@ -4031,7 +4031,7 @@ pmcraid_register_interrupt_handler(struct pmcraid_instance *pinstance) return 0; out_unwind: - while (--i > 0) + while (--i >= 0) free_irq(pci_irq_vector(pdev, i), &pinstance->hrrq_vector[i]); pci_free_irq_vectors(pdev); return rc; -- 2.35.1