media: ddbridge: fix an error code problem in ddb_probe
authorSu Hui <suhui@nfschina.com>
Fri, 20 Oct 2023 09:17:23 +0000 (17:17 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Feb 2024 20:14:28 +0000 (20:14 +0000)
[ Upstream commit 09b4195021be69af1e1936cca995712a6d0f2562 ]

Error code is assigned to 'stat', return 'stat' rather than '-1'.

Signed-off-by: Su Hui <suhui@nfschina.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/pci/ddbridge/ddbridge-main.c

index 91733ab9f58c35be71367b0112df3615ead17f6d..363badab7cf07b9a0c8e399c6d171a780f4737a4 100644 (file)
@@ -238,7 +238,7 @@ fail:
        ddb_unmap(dev);
        pci_set_drvdata(pdev, NULL);
        pci_disable_device(pdev);
-       return -1;
+       return stat;
 }
 
 /****************************************************************************/