From: Andy Shevchenko Date: Mon, 24 Nov 2025 08:45:47 +0000 (+0100) Subject: ptp: ocp: Apply standard pattern for cleaning up loop X-Git-Tag: v6.19-rc1~170^2~72^2~1 X-Git-Url: https://gentwo.org/gitweb/?a=commitdiff_plain;h=4c84a5c7b095ea52e65ace483177fce23e55fa8f;p=linux%2F.git 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 Signed-off-by: Andy Shevchenko Link: https://patch.msgid.link/20251124084816.205035-4-andriy.shevchenko@linux.intel.com Signed-off-by: Jakub Kicinski --- 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); }