From: Stephen Boyd <sboyd@kernel.org>
To: Abel Vesa <abel.vesa@linaro.org>,
Dan Carpenter <dan.carpenter@linaro.org>,
oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
linux-kernel@vger.kernel.org,
Neil Armstrong <neil.armstrong@linaro.org>
Subject: Re: drivers/spmi/spmi-pmic-arb.c:1782 spmi_pmic_arb_register_buses() error: uninitialized symbol 'ret'.
Date: Wed, 09 Oct 2024 15:58:54 -0700 [thread overview]
Message-ID: <92d5e28d2e7013ff393ed5d0ce1538fd.sboyd@kernel.org> (raw)
In-Reply-To: <67cf80cf-d96d-4249-ac34-6085d4b32948@suswa.mountain>
Quoting Dan Carpenter (2024-09-18 03:29:07)
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: adfc3ded5c33d67e822525f95404ef0becb099b8
> commit: 9799873717398e8fa1727482e578b9d777da645e spmi: pmic-arb: Add multi bus support
> config: mips-randconfig-r072-20240916 (https://download.01.org/0day-ci/archive/20240916/202409162313.TnpH4qKB-lkp@intel.com/config)
> compiler: mips64-linux-gcc (GCC) 14.1.0
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> | Closes: https://lore.kernel.org/r/202409162313.TnpH4qKB-lkp@intel.com/
>
> smatch warnings:
> drivers/spmi/spmi-pmic-arb.c:1782 spmi_pmic_arb_register_buses() error: uninitialized symbol 'ret'.
>
> vim +/ret +1782 drivers/spmi/spmi-pmic-arb.c
>
> 9799873717398e8 Abel Vesa 2024-05-07 1762 static int spmi_pmic_arb_register_buses(struct spmi_pmic_arb *pmic_arb,
> 9799873717398e8 Abel Vesa 2024-05-07 1763 struct platform_device *pdev)
> 9799873717398e8 Abel Vesa 2024-05-07 1764 {
> 9799873717398e8 Abel Vesa 2024-05-07 1765 struct device *dev = &pdev->dev;
> 9799873717398e8 Abel Vesa 2024-05-07 1766 struct device_node *node = dev->of_node;
> 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?
I'm amendable to a 'return 0' here.
prev parent reply other threads:[~2024-10-09 22:58 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
2024-10-09 22:58 ` Stephen Boyd [this message]
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=92d5e28d2e7013ff393ed5d0ce1538fd.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