summaryrefslogtreecommitdiffstats
path: root/drivers/ptp/ptp_ocp.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-31 09:10:03 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-31 09:10:03 +0200
commit92722bac5fe4dc4582282bad02dd1fb95e892705 (patch)
tree669a7eac6392b08965cbb5be456b9881aeb30b96 /drivers/ptp/ptp_ocp.c
parentdriver core: Drop helper devm_platform_ioremap_resource_wc() (diff)
parentLinux 5.13-rc4 (diff)
downloadlinux-92722bac5fe4dc4582282bad02dd1fb95e892705.tar.xz
linux-92722bac5fe4dc4582282bad02dd1fb95e892705.zip
Merge 5.13-rc4 into driver-core-next
We need the driver core fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/ptp/ptp_ocp.c')
-rw-r--r--drivers/ptp/ptp_ocp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c
index 530e5f90095e..0d1034e3ed0f 100644
--- a/drivers/ptp/ptp_ocp.c
+++ b/drivers/ptp/ptp_ocp.c
@@ -324,7 +324,7 @@ ptp_ocp_probe(struct pci_dev *pdev, const struct pci_device_id *id)
if (!bp->base) {
dev_err(&pdev->dev, "io_remap bar0\n");
err = -ENOMEM;
- goto out;
+ goto out_release_regions;
}
bp->reg = bp->base + OCP_REGISTER_OFFSET;
bp->tod = bp->base + TOD_REGISTER_OFFSET;
@@ -347,6 +347,8 @@ ptp_ocp_probe(struct pci_dev *pdev, const struct pci_device_id *id)
return 0;
out:
+ pci_iounmap(pdev, bp->base);
+out_release_regions:
pci_release_regions(pdev);
out_disable:
pci_disable_device(pdev);