drivers/pinctrl/pinctrl-aw9523.c:658 aw9523_gpio_set_multiple() warn: inconsistent returns '&awi->i2c_lock'.
kernel test robot
build botBCC: [email protected]
CC: [email protected]
CC: [email protected]
TO: Bartosz Golaszewski <[email protected]>
CC: Linus Walleij <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel head: 62be3d6e481122f02364993fee8322a681072918 commit: dffe286e2428a32bf5a70648d22a678b83080414 [42/53] pinctrl: aw9523: use new GPIO line value setter callbacks
:::::: branch date: 5 hours ago
:::::: commit date: 24 hours ago
config: x86_64-randconfig-161-20250619 (https://download.01.org/0day-ci/archive/20250619/[email protected]/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
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 <[email protected]> | Reported-by: Dan Carpenter <[email protected]> | Closes: https://lore.kernel.org/r/[email protected]/
New smatch warnings:drivers/pinctrl/pinctrl-aw9523.c:658 aw9523_gpio_set_multiple() warn: inconsistent returns '&awi->i2c_lock'.
Old smatch warnings:drivers/pinctrl/pinctrl-aw9523.c:354 aw9523_pconf_set() error: uninitialized symbol 'rc'. drivers/pinctrl/pinctrl-aw9523.c:625 aw9523_gpio_get_multiple() error: uninitialized symbol 'ret'.
vim +658 drivers/pinctrl/pinctrl-aw9523.c
576623d706613f AngeloGioacchino Del Regno 2024-03-01 627
dffe286e2428a3 Bartosz Golaszewski 2025-06-12 628 static int aw9523_gpio_set_multiple(struct gpio_chip *chip,
576623d706613f AngeloGioacchino Del Regno 2024-03-01 629 unsigned long *mask,
576623d706613f AngeloGioacchino Del Regno 2024-03-01 630 unsigned long *bits)
576623d706613f AngeloGioacchino Del Regno 2024-03-01 631 {
576623d706613f AngeloGioacchino Del Regno 2024-03-01 632 struct aw9523 *awi = gpiochip_get_data(chip);
576623d706613f AngeloGioacchino Del Regno 2024-03-01 633 u8 mask_lo, mask_hi, bits_lo, bits_hi;
576623d706613f AngeloGioacchino Del Regno 2024-03-01 634 unsigned int reg;
dffe286e2428a3 Bartosz Golaszewski 2025-06-12 635 int ret = 0;
576623d706613f AngeloGioacchino Del Regno 2024-03-01 636
4210ef801a2482 Andy Shevchenko 2024-03-29 637 mask_lo = *mask;
4210ef801a2482 Andy Shevchenko 2024-03-29 638 mask_hi = *mask >> 8;
4210ef801a2482 Andy Shevchenko 2024-03-29 639 bits_lo = *bits;
4210ef801a2482 Andy Shevchenko 2024-03-29 640 bits_hi = *bits >> 8;
4210ef801a2482 Andy Shevchenko 2024-03-29 641
576623d706613f AngeloGioacchino Del Regno 2024-03-01 642 mutex_lock(&awi->i2c_lock);
576623d706613f AngeloGioacchino Del Regno 2024-03-01 643 if (mask_hi) {
576623d706613f AngeloGioacchino Del Regno 2024-03-01 644 reg = AW9523_REG_OUT_STATE(AW9523_PINS_PER_PORT);
576623d706613f AngeloGioacchino Del Regno 2024-03-01 645 ret = regmap_write_bits(awi->regmap, reg, mask_hi, bits_hi);
091655b9285d83 Andy Shevchenko 2024-03-29 646 if (ret)
dffe286e2428a3 Bartosz Golaszewski 2025-06-12 647 goto out;
576623d706613f AngeloGioacchino Del Regno 2024-03-01 648 }
576623d706613f AngeloGioacchino Del Regno 2024-03-01 649 if (mask_lo) {
576623d706613f AngeloGioacchino Del Regno 2024-03-01 650 reg = AW9523_REG_OUT_STATE(0);
576623d706613f AngeloGioacchino Del Regno 2024-03-01 651 ret = regmap_write_bits(awi->regmap, reg, mask_lo, bits_lo);
576623d706613f AngeloGioacchino Del Regno 2024-03-01 652 if (ret)
dffe286e2428a3 Bartosz Golaszewski 2025-06-12 653 goto out;
576623d706613f AngeloGioacchino Del Regno 2024-03-01 654 }
576623d706613f AngeloGioacchino Del Regno 2024-03-01 655 mutex_unlock(&awi->i2c_lock);
dffe286e2428a3 Bartosz Golaszewski 2025-06-12 656
dffe286e2428a3 Bartosz Golaszewski 2025-06-12 657 out:dffe286e2428a3 Bartosz Golaszewski 2025-06-12 @658 return ret;576623d706613f AngeloGioacchino Del Regno 2024-03-01 659 } 576623d706613f AngeloGioacchino Del Regno 2024-03-01 660
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki