lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202601182117.l2nFZ5OB-lkp@intel.com>
Date: Sun, 18 Jan 2026 21:28:33 +0800
From: kernel test robot <lkp@...el.com>
To: Josua Mayer <josua@...id-run.com>,
	Marc Kleine-Budde <mkl@...gutronix.de>,
	Vincent Mailhol <mailhol@...nel.org>, Vinod Koul <vkoul@...nel.org>,
	Neil Armstrong <neil.armstrong@...aro.org>,
	Peter Rosin <peda@...ntia.se>, Aaro Koskinen <aaro.koskinen@....fi>,
	Andreas Kemnade <andreas@...nade.info>,
	Kevin Hilman <khilman@...libre.com>,
	Roger Quadros <rogerq@...nel.org>, Tony Lindgren <tony@...mide.com>,
	Janusz Krzysztofik <jmkrzyszt@...il.com>,
	Vignesh R <vigneshr@...com>, Andi Shyti <andi.shyti@...nel.org>,
	Ulf Hansson <ulf.hansson@...aro.org>, Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Geert Uytterhoeven <geert+renesas@...der.be>,
	Magnus Damm <magnus.damm@...il.com>,
	Wolfram Sang <wsa-dev@...g-engineering.com>
Cc: oe-kbuild-all@...ts.linux.dev,
	Yazan Shhady <yazan.shhady@...id-run.com>,
	Jon Nettleton <jon@...id-run.com>,
	Mikhail Anikin <mikhail.anikin@...id-run.com>,
	linux-can@...r.kernel.org, linux-phy@...ts.infradead.org,
	linux-kernel@...r.kernel.org, linux-omap@...r.kernel.org,
	linux-i2c@...r.kernel.org, linux-mmc@...r.kernel.org,
	devicetree@...r.kernel.org
Subject: Re: [PATCH v5 2/7] mux: Add helper functions for getting optional
 and selected mux-state

Hi Josua,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 8f0b4cce4481fb22653697cced8d0d04027cb1e8]

url:    https://github.com/intel-lab-lkp/linux/commits/Josua-Mayer/phy-can-transceiver-rename-temporary-helper-function-to-avoid-conflict/20260118-183905
base:   8f0b4cce4481fb22653697cced8d0d04027cb1e8
patch link:    https://lore.kernel.org/r/20260118-rz-sdio-mux-v5-2-3c37e8872683%40solid-run.com
patch subject: [PATCH v5 2/7] mux: Add helper functions for getting optional and selected mux-state
config: um-randconfig-r071-20260118 (https://download.01.org/0day-ci/archive/20260118/202601182117.l2nFZ5OB-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 9b8addffa70cee5b2acc5454712d9cf78ce45710)
smatch version: v0.5.0-8985-g2614ff1a
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260118/202601182117.l2nFZ5OB-lkp@intel.com/reproduce)

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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601182117.l2nFZ5OB-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/mux/core.c:774:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
     774 |         if (IS_ERR_OR_NULL(mstate))
         |             ^~~~~~~~~~~~~~~~~~~~~~
   drivers/mux/core.c:793:17: note: uninitialized use occurs here
     793 |         return ERR_PTR(ret);
         |                        ^~~
   drivers/mux/core.c:774:2: note: remove the 'if' if its condition is always false
     774 |         if (IS_ERR_OR_NULL(mstate))
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
     775 |                 goto err_mux_state_get;
         |                 ~~~~~~~~~~~~~~~~~~~~~~
   drivers/mux/core.c:767:9: note: initialize the variable 'ret' to silence this warning
     767 |         int ret;
         |                ^
         |                 = 0
   1 warning generated.


vim +774 drivers/mux/core.c

   748	
   749	/**
   750	 * __devm_mux_state_get() - Get the optional mux-state for a device,
   751	 *			    with resource management.
   752	 * @dev: The device that needs a mux-state.
   753	 * @mux_name: The name identifying the mux-state.
   754	 * @optional: Whether to return NULL and silence errors when mux doesn't exist.
   755	 * @init: Optional function pointer for mux-state object initialisation.
   756	 * @exit: Optional function pointer for mux-state object cleanup on release.
   757	 *
   758	 * Return: Pointer to the mux-state, or an ERR_PTR with a negative errno.
   759	 */
   760	static struct mux_state *__devm_mux_state_get(struct device *dev, const char *mux_name,
   761						      bool optional,
   762						      int (*init)(struct mux_state *mstate),
   763						      int (*exit)(struct mux_state *mstate))
   764	{
   765		struct devm_mux_state_state *devm_state;
   766		struct mux_state *mstate;
   767		int ret;
   768	
   769		devm_state = devres_alloc(devm_mux_state_release, sizeof(*devm_state), GFP_KERNEL);
   770		if (!devm_state)
   771			return ERR_PTR(-ENOMEM);
   772	
   773		mstate = mux_state_get(dev, mux_name, optional);
 > 774		if (IS_ERR_OR_NULL(mstate))
   775			goto err_mux_state_get;
   776	
   777		if (init) {
   778			ret = init(mstate);
   779			if (ret)
   780				goto err_mux_state_init;
   781		}
   782	
   783		devm_state->mstate = mstate;
   784		devm_state->exit = exit;
   785		devres_add(dev, devm_state);
   786	
   787		return mstate;
   788	
   789	err_mux_state_init:
   790		mux_state_put(mstate);
   791	err_mux_state_get:
   792		devres_free(devm_state);
   793		return ERR_PTR(ret);
   794	}
   795	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ