summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2025-11-24 09:45:47 +0100
committerJakub Kicinski <kuba@kernel.org>2025-11-25 19:17:21 -0800
commit4c84a5c7b095ea52e65ace483177fce23e55fa8f (patch)
tree2f5d37ffc7174c2c216ca137435bd96430ad627e
parent590f5d1fa6ee22b1ec07283d5fa870326f47b2f6 (diff)
ptp: ocp: Apply standard pattern for cleaning up loop
The while (i--) is a standard pattern for the cleaning up loops. Apply this pattern where it makes sense in the driver. Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20251124084816.205035-4-andriy.shevchenko@linux.intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r--drivers/ptp/ptp_ocp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c
index 28243fb1d78f..c1d190a09c33 100644
--- a/drivers/ptp/ptp_ocp.c
+++ b/drivers/ptp/ptp_ocp.c
@@ -4821,8 +4821,7 @@ ptp_ocp_probe(struct pci_dev *pdev, const struct pci_device_id *id)
return 0;
out_dpll:
- while (i) {
- --i;
+ while (i--) {
dpll_pin_unregister(bp->dpll, bp->sma[i].dpll_pin, &dpll_pins_ops, &bp->sma[i]);
dpll_pin_put(bp->sma[i].dpll_pin);
}