Re: [PATCH] ice: Use common error handling code in two functions

From: Przemek Kitszel
Date: Fri Sep 20 2024 - 02:35:11 EST


On 9/19/24 19:15, Markus Elfring wrote:
From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 19 Sep 2024 19:00:25 +0200

Add jump targets so that a bit of exception handling can be better reused
at the end of two function implementations.

Thank you for contribution, the change is fine, but not as a bugfix.
Please send as a [iwl-next], when the submission window opens.


This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>


@@ -3168,6 +3164,10 @@ static int ice_ptp_init_owner(struct ice_pf *pf)
pf->ptp.clock = NULL;
err_exit:
return err;
+
+err_unlock:
+ ice_ptp_unlock(hw);
+ return err;
}

You kept the current label naming scheme, that's good.