Thread (4 messages) 4 messages, 4 authors, 2026-03-25

Re: [PATCH] clk: uniphier: mux: fix signedness bug in get_parent

From: Brian Masney <bmasney@redhat.com>
Date: 2026-03-18 17:06:05
Also in: linux-clk, lkml

On Wed, Mar 18, 2026 at 11:02:51AM +0000, Anas Iqbal wrote:
The uniphier_clk_mux_get_parent() function returns a u8, but
propagates negative error codes such as -EINVAL and regmap_read()
failures. These values are implicitly converted to large unsigned
integers, resulting in invalid parent indices.

The clk_ops.get_parent() callback is expected to return a valid
parent index and does not support error codes. Fix this by returning
0 as a safe fallback in error cases.

Fixes: 734d82f4a678 ("clk: uniphier: add core support code for UniPhier clock driver")
Signed-off-by: Anas Iqbal <redacted>
Reviewed-by: Brian Masney <bmasney@redhat.com>

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help