From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 770A61875 for ; Wed, 28 Dec 2022 15:54:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C19F8C433D2; Wed, 28 Dec 2022 15:54:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1672242898; bh=MdlhajfASTJ3FivlaMwMVyPAbLwpoGu9hwUtZuiH/OM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gIPEU1JfW9mBrFCujXz5g9s3hx0HWVONVmNN+HPT4dlsMQFVITQwWH/M+1T+UskRo DF+En3qzaGDxrAEZIgbWcEbNd26I3uZ3JqwQ+9YMeMHFcJ/sKukFRIX7o0yBUF9ZJ5 1FWW/uosCa7TEhKW79dK29v1HMd1EGP6MCesF7Dw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Liu Shixin , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 6.0 0467/1073] media: saa7164: fix missing pci_disable_device() Date: Wed, 28 Dec 2022 15:34:15 +0100 Message-Id: <20221228144340.720721470@linuxfoundation.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221228144328.162723588@linuxfoundation.org> References: <20221228144328.162723588@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Liu Shixin [ Upstream commit 57fb35d7542384cac8f198cd1c927540ad38b61a ] Add missing pci_disable_device() in the error path in saa7164_initdev(). Fixes: 443c1228d505 ("V4L/DVB (12923): SAA7164: Add support for the NXP SAA7164 silicon") Signed-off-by: Liu Shixin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/pci/saa7164/saa7164-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/pci/saa7164/saa7164-core.c b/drivers/media/pci/saa7164/saa7164-core.c index 7973ae42873a..c10997e2271d 100644 --- a/drivers/media/pci/saa7164/saa7164-core.c +++ b/drivers/media/pci/saa7164/saa7164-core.c @@ -1259,7 +1259,7 @@ static int saa7164_initdev(struct pci_dev *pci_dev, if (saa7164_dev_setup(dev) < 0) { err = -EINVAL; - goto fail_free; + goto fail_dev; } /* print pci info */ @@ -1427,6 +1427,8 @@ static int saa7164_initdev(struct pci_dev *pci_dev, fail_irq: saa7164_dev_unregister(dev); +fail_dev: + pci_disable_device(pci_dev); fail_free: v4l2_device_unregister(&dev->v4l2_dev); kfree(dev); -- 2.35.1