mod/clock: Remove deadcode and fix erroneous condition checking in set rate function
- There is a dead-code in the clock_set_rate function which is removed. https://jira.arm.com/browse/PWRSOFT-6333
Details: The status variable is initialized and checked against a constant expression before being updated by the return value of a function which is the intent behind this variable, hence the check is removed.
- There is a condition which will always be true is removed. https://jira.arm.com/browse/PWRSOFT-6327
Details: The create_async_request_set_rate()
function creates an event with a delayed response, returning FWK_PENDING to indicate that the event was successfully created and the device context updated. Previously, clock_set_rate()
erroneously checked the return value using a condition that always evaluated to true due to the use of the OR (||)
operator.
This fixes the condition so that the debug log is only triggered if the return value is not FWK_PENDING
, ensuring that the function's behavior correctly reflects the expected return value and does not produce misleading debug output.
Signed-off-by: Md Golam Tanvir Zim mdgolamtanvir.zim@arm.com Change-Id: Iaa3e0bd2c3937cc3a13a7bb3b7df4a5b75c4d7ba