Thread (32 messages) 32 messages, 6 authors, 2023-11-28

Re: [PATCH v2 06/21] pinctrl: equilibrium: Convert to use struct pingroup

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2023-11-24 14:38:55
Also in: linux-arm-msm, linux-gpio, linux-mediatek, linux-mips, linux-renesas-soc, lkml, oe-kbuild-all

On Fri, Nov 24, 2023 at 09:19:45PM +0800, kernel test robot wrote:

...
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 [off-list ref]
| Closes: https://lore.kernel.org/oe-kbuild-all/202311241401.ZPILPdov-lkp@intel.com/ (local)

smatch warnings:
drivers/pinctrl/pinctrl-equilibrium.c:719 eqbr_build_groups() warn: unsigned 'grp->npins' is never less than zero.
Thank you for the report!

...
   718			grp->npins = of_property_count_u32_elems(np, "pins");
 > 719			if (grp->npins < 0) {
   720				dev_err(dev, "No pins in the group: %s\n", prop->name);
   721				of_node_put(np);
   722				return -EINVAL;
   723			}
Surprisingly (to me) the _count_u32_elems() can return a negative error code...
Fine, I redo a bit the code by introducing a new patch that will use err instead
of ->npins (which sounds better approach anyway).

-- 
With Best Regards,
Andy Shevchenko



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help