Skip to content

Commit

Permalink
Merge branch 'ptp-ocp-minor-updates-and-fixes'
Browse files Browse the repository at this point in the history
Jonathan Lemon says:

====================
ptp: ocp: minor updates and fixes.

Fix errors spotted by automated tools.

Add myself to the MAINTAINERS for the ptp_ocp driver.
====================

Link: https://lore.kernel.org/r/20210816221337.390645-1-jonathan.lemon@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Jakub Kicinski committed Aug 17, 2021
2 parents fd04ed1 + b40fb16 commit 4e25792
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
6 changes: 6 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -13885,6 +13885,12 @@ F: Documentation/devicetree/
F: arch/*/boot/dts/
F: include/dt-bindings/

OPENCOMPUTE PTP CLOCK DRIVER
M: Jonathan Lemon <jonathan.lemon@gmail.com>
L: netdev@vger.kernel.org
S: Maintained
F: drivers/ptp/ptp_ocp.c

OPENCORES I2C BUS DRIVER
M: Peter Korsgaard <peter@korsgaard.com>
M: Andrew Lunn <andrew@lunn.ch>
Expand Down
1 change: 1 addition & 0 deletions drivers/ptp/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ config PTP_1588_CLOCK_OCP
imply MTD_SPI_NOR
imply I2C_XILINX
select SERIAL_8250
select NET_DEVLINK

default n
help
Expand Down
9 changes: 5 additions & 4 deletions drivers/ptp/ptp_ocp.c
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ ptp_ocp_devlink_flash(struct devlink *devlink, struct device *dev,
size_t off, len, resid, wrote;
struct erase_info erase;
size_t base, blksz;
int err;
int err = 0;

off = 0;
base = bp->flash_start;
Expand Down Expand Up @@ -1438,7 +1438,7 @@ ptp_ocp_probe(struct pci_dev *pdev, const struct pci_device_id *id)
bp = devlink_priv(devlink);
err = ptp_ocp_device_init(bp, pdev);
if (err)
goto out_unregister;
goto out_disable;

/* compat mode.
* Older FPGA firmware only returns 2 irq's.
Expand Down Expand Up @@ -1476,8 +1476,9 @@ ptp_ocp_probe(struct pci_dev *pdev, const struct pci_device_id *id)

out:
ptp_ocp_detach(bp);
pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL);
out_disable:
pci_disable_device(pdev);
out_unregister:
devlink_unregister(devlink);
out_free:
Expand All @@ -1493,8 +1494,8 @@ ptp_ocp_remove(struct pci_dev *pdev)
struct devlink *devlink = priv_to_devlink(bp);

ptp_ocp_detach(bp);
pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL);
pci_disable_device(pdev);

devlink_unregister(devlink);
devlink_free(devlink);
Expand Down

0 comments on commit 4e25792

Please sign in to comment.