Commit 4c84a5c7 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Jakub Kicinski
Browse files

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: default avatarVadim Fedorenko <vadim.fedorenko@linux.dev>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20251124084816.205035-4-andriy.shevchenko@linux.intel.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 590f5d1f
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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);
	}