serial: lpuart: Return value from correct variable
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Mon, 11 Aug 2025 16:25:17 +0000 (17:25 +0100)
committerPeng Fan <peng.fan@nxp.com>
Wed, 27 Aug 2025 07:52:20 +0000 (15:52 +0800)
commit4d3183723f34d58cb5decec77e8bf64b84d309d1
tree2f2a935d8dca61b3e0c4c7439b0c6c28ba487384
parentdc37adfc040877db359abdc7eab19adffb8fc722
serial: lpuart: Return value from correct variable

In get_lpuart_clk_rate if the call to clk_get_rate returns an error then
the call to return should pass the value of the error which is in rate
rather than ret which will be 0 as its value is not affected by this
error.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/serial/serial_lpuart.c