linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Re: [linux-next:master 6954/7322] drivers/spmi/spmi-pmic-arb.c:1782 spmi_pmic_arb_register_buses() error: uninitialized symbol 'ret'.
       [not found] <a1b833a4-435a-411d-ba4e-b77f5ba9fd94@moroto.mountain>
@ 2024-04-23 18:56 ` Stephen Boyd
  0 siblings, 0 replies; only message in thread
From: Stephen Boyd @ 2024-04-23 18:56 UTC (permalink / raw)
  To: Abel Vesa, Dan Carpenter, oe-kbuild
  Cc: lkp, oe-kbuild-all, Linux Memory Management List, Neil Armstrong

Quoting Dan Carpenter (2024-04-22 06:56:07)
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   f529a6d274b3b8c75899e949649d231298f30a32
> commit: ee2098c0b512fb80b63119199938ea62a240ebc7 [6954/7322] spmi: pmic-arb: Add multi bus support
> config: openrisc-randconfig-r071-20240422 (https://download.01.org/0day-ci/archive/20240422/202404221945.jickYhnO-lkp@intel.com/config)
> compiler: or1k-linux-gcc (GCC) 13.2.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/202404221945.jickYhnO-lkp@intel.com/

Thanks

> 
> New smatch warnings:
> drivers/spmi/spmi-pmic-arb.c:1782 spmi_pmic_arb_register_buses() error: uninitialized symbol 'ret'.
> 
> Old smatch warnings:
> drivers/spmi/spmi-pmic-arb.c:1724 spmi_pmic_arb_bus_init() warn: unsigned 'irq' is never less than zero.
> 
> vim +/ret +1782 drivers/spmi/spmi-pmic-arb.c
> 
> ee2098c0b512fb Abel Vesa 2024-04-17  1762  static int spmi_pmic_arb_register_buses(struct spmi_pmic_arb *pmic_arb,
> ee2098c0b512fb Abel Vesa 2024-04-17  1763                                       struct platform_device *pdev)
> ee2098c0b512fb Abel Vesa 2024-04-17  1764  {
> ee2098c0b512fb Abel Vesa 2024-04-17  1765       struct device *dev = &pdev->dev;
> ee2098c0b512fb Abel Vesa 2024-04-17  1766       struct device_node *node = dev->of_node;
> ee2098c0b512fb Abel Vesa 2024-04-17  1767       struct device_node *child;
> ee2098c0b512fb Abel Vesa 2024-04-17  1768       int ret;
> ee2098c0b512fb Abel Vesa 2024-04-17  1769  
> ee2098c0b512fb Abel Vesa 2024-04-17  1770       /* legacy mode doesn't provide child node for the bus */
> ee2098c0b512fb Abel Vesa 2024-04-17  1771       if (of_device_is_compatible(node, "qcom,spmi-pmic-arb"))
> ee2098c0b512fb Abel Vesa 2024-04-17  1772               return spmi_pmic_arb_bus_init(pdev, node, pmic_arb);
> ee2098c0b512fb Abel Vesa 2024-04-17  1773  
> ee2098c0b512fb Abel Vesa 2024-04-17  1774       for_each_available_child_of_node(node, child) {
> ee2098c0b512fb Abel Vesa 2024-04-17  1775               if (of_node_name_eq(child, "spmi")) {
> 
> Smatch is complaining that maybe spmi is never found.
> 
> ee2098c0b512fb Abel Vesa 2024-04-17  1776                       ret = spmi_pmic_arb_bus_init(pdev, child, pmic_arb);
> ee2098c0b512fb Abel Vesa 2024-04-17  1777                       if (ret)
> ee2098c0b512fb Abel Vesa 2024-04-17  1778                               return ret;
> ee2098c0b512fb Abel Vesa 2024-04-17  1779               }
> ee2098c0b512fb Abel Vesa 2024-04-17  1780       }
> ee2098c0b512fb Abel Vesa 2024-04-17  1781  
> ee2098c0b512fb Abel Vesa 2024-04-17 @1782       return ret;

Seems like we should simply return 0 here.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-23 18:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <a1b833a4-435a-411d-ba4e-b77f5ba9fd94@moroto.mountain>
2024-04-23 18:56 ` [linux-next:master 6954/7322] drivers/spmi/spmi-pmic-arb.c:1782 spmi_pmic_arb_register_buses() error: uninitialized symbol 'ret' Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox