Re: [PATCH] ptp: Add error handling for adjfine callback in ptp_clock_adjtime

From: Richard Cochran
Date: Mon Nov 25 2024 - 23:39:58 EST


On Mon, Nov 25, 2024 at 10:59:54AM +0000, Ajay Kaher wrote:
> ptp_clock_adjtime sets ptp->dialed_frequency even when adjfine
> callback returns an error. This causes subsequent reads to return
> an incorrect value.
>
> Fix this by adding error check before ptp->dialed_frequency is set.
>
> Fixes: 39a8cbd9ca05 ("ptp: remember the adjusted frequency")
> Signed-off-by: Ajay Kaher <ajay.kaher@xxxxxxxxxxxx>

Acked-by: Richard Cochran <richardcochran@xxxxxxxxx>