public inbox for linux-clk@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Masney <bmasney@redhat.com>
To: Anas Iqbal <mohd.abd.6602@gmail.com>
Cc: mturquette@baylibre.com, sboyd@kernel.org,
	linux-clk@vger.kernel.org, hayashi.kunihiko@socionext.com,
	mhiramat@kernel.org, yamada.masahiro@socionext.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] clk: uniphier: mux: fix signedness bug in get_parent
Date: Wed, 18 Mar 2026 13:05:59 -0400	[thread overview]
Message-ID: <abrbdx8jsVaG9LVG@redhat.com> (raw)
In-Reply-To: <20260318110251.2412-1-mohd.abd.6602@gmail.com>

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 <mohd.abd.6602@gmail.com>

Reviewed-by: Brian Masney <bmasney@redhat.com>


  reply	other threads:[~2026-03-18 17:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-18 11:02 [PATCH] clk: uniphier: mux: fix signedness bug in get_parent Anas Iqbal
2026-03-18 17:05 ` Brian Masney [this message]
2026-03-24  0:44 ` Stephen Boyd
2026-03-25  5:11   ` Kunihiko Hayashi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=abrbdx8jsVaG9LVG@redhat.com \
    --to=bmasney@redhat.com \
    --cc=hayashi.kunihiko@socionext.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mohd.abd.6602@gmail.com \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@kernel.org \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox