Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Andy Shevchenko and committed by
Jakub Kicinski
4c84a5c7 590f5d1f

+1 -2
+1 -2
drivers/ptp/ptp_ocp.c
··· 4821 4821 4822 4822 return 0; 4823 4823 out_dpll: 4824 - while (i) { 4825 - --i; 4824 + while (i--) { 4826 4825 dpll_pin_unregister(bp->dpll, bp->sma[i].dpll_pin, &dpll_pins_ops, &bp->sma[i]); 4827 4826 dpll_pin_put(bp->sma[i].dpll_pin); 4828 4827 }