From: Stephen Boyd <sboyd@kernel.org>
To: Abel Vesa <abel.vesa@linaro.org>,
Dan Carpenter <dan.carpenter@linaro.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: drivers/spmi/spmi-pmic-arb.c:1782 spmi_pmic_arb_register_buses() error: uninitialized symbol 'ret'.
Date: Sat, 21 Sep 2024 12:54:10 -0700 [thread overview]
Message-ID: <cae4d71b611c36dab4003fa4ec3bab61.sboyd@kernel.org> (raw)
In-Reply-To: <d9e0ade6-8a7e-4ba4-974f-142ad246ce5d@linaro.org>
Quoting Neil Armstrong (2024-09-18 03:34:22)
> On 18/09/2024 12:29, Dan Carpenter wrote:
> > 9799873717398e8 Abel Vesa 2024-05-07 1767 struct device_node *child;
> > 9799873717398e8 Abel Vesa 2024-05-07 1768 int ret;
> > 9799873717398e8 Abel Vesa 2024-05-07 1769
> > 9799873717398e8 Abel Vesa 2024-05-07 1770 /* legacy mode doesn't provide child node for the bus */
> > 9799873717398e8 Abel Vesa 2024-05-07 1771 if (of_device_is_compatible(node, "qcom,spmi-pmic-arb"))
> > 9799873717398e8 Abel Vesa 2024-05-07 1772 return spmi_pmic_arb_bus_init(pdev, node, pmic_arb);
> > 9799873717398e8 Abel Vesa 2024-05-07 1773
> > 9799873717398e8 Abel Vesa 2024-05-07 1774 for_each_available_child_of_node(node, child) {
> > 9799873717398e8 Abel Vesa 2024-05-07 1775 if (of_node_name_eq(child, "spmi")) {
> > 9799873717398e8 Abel Vesa 2024-05-07 1776 ret = spmi_pmic_arb_bus_init(pdev, child, pmic_arb);
> > 9799873717398e8 Abel Vesa 2024-05-07 1777 if (ret)
> > 9799873717398e8 Abel Vesa 2024-05-07 1778 return ret;
> > 9799873717398e8 Abel Vesa 2024-05-07 1779 }
> > 9799873717398e8 Abel Vesa 2024-05-07 1780 }
> > 9799873717398e8 Abel Vesa 2024-05-07 1781
> > 9799873717398e8 Abel Vesa 2024-05-07 @1782 return ret;
> >
> > Is it possible to not have an spmi node?
>
> It's possible but not allowed per the bindings.
>
Seems that we should just return 0 here then and squelch the warning.
next prev parent reply other threads:[~2024-09-21 19:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-18 10:29 drivers/spmi/spmi-pmic-arb.c:1782 spmi_pmic_arb_register_buses() error: uninitialized symbol 'ret' Dan Carpenter
2024-09-18 10:34 ` Neil Armstrong
2024-09-21 19:54 ` Stephen Boyd [this message]
2024-10-09 22:58 ` Stephen Boyd
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=cae4d71b611c36dab4003fa4ec3bab61.sboyd@kernel.org \
--to=sboyd@kernel.org \
--cc=abel.vesa@linaro.org \
--cc=dan.carpenter@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=neil.armstrong@linaro.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
/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