drivers/staging/iio/resolver/ad2s1210.c:560 ad2s1210_initial() warn: inconsistent returns '&st->lock'.
PATCH 140/154 drivers/staging/iio/resolver/ad2s1210.c:560 ad2s1210_initial() warn: inconsistent returns '&st->lock'.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git testing head: a533eeaef80e879b3ad1937eee7a43d1f9961c5d commit: 0d03d0e6584655a002c4e3aaae657b35f0900921 [140/154] staging: iio: resolver: ad2s1210: rework gpios config: x86_64-randconfig-161-20231002 (https://download.01.org/0day-ci/archive/20231003/[email protected]/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce: (https://download.01.org/0day-ci/archive/20231003/[email protected]/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 <[email protected]> | Reported-by: Dan Carpenter <[email protected]> | Closes: https://lore.kernel.org/r/[email protected]/
smatch warnings:drivers/staging/iio/resolver/ad2s1210.c:560 ad2s1210_initial() warn: inconsistent returns '&st->lock'.
vim +560 drivers/staging/iio/resolver/ad2s1210.c
4ae1c61ff2ba4f Bill Pemberton 2012-11-19 534 static int ad2s1210_initial(struct ad2s1210_state *st)
817e5c65c511d4 Graf Yang 2010-10-27 535 {
817e5c65c511d4 Graf Yang 2010-10-27 536 unsigned char data;
817e5c65c511d4 Graf Yang 2010-10-27 537 int ret;
817e5c65c511d4 Graf Yang 2010-10-27 538
817e5c65c511d4 Graf Yang 2010-10-27 539 mutex_lock(&st->lock);
0d03d0e6584655 David Lechner 2023-09-29 540 ret = ad2s1210_set_resolution_gpios(st, st->resolution);
0d03d0e6584655 David Lechner 2023-09-29 541 if (ret < 0)
0d03d0e6584655 David Lechner 2023-09-29 542 return ret;goto error_ret;
b19e9ad5e2cb91 Jonathan Cameron 2011-06-27 543 b3689e14415a87 David Lechner 2023-09-29 544 /* Use default config register value plus resolution from devicetree. */ b3689e14415a87 David Lechner 2023-09-29 545 data = FIELD_PREP(AD2S1210_PHASE_LOCK_RANGE_44, 1); b3689e14415a87 David Lechner 2023-09-29 546 data |= FIELD_PREP(AD2S1210_ENABLE_HYSTERESIS, 1); b3689e14415a87 David Lechner 2023-09-29 547 data |= FIELD_PREP(AD2S1210_SET_ENRES, 0x3); b3689e14415a87 David Lechner 2023-09-29 548 data |= FIELD_PREP(AD2S1210_SET_RES, (st->resolution - 10) >> 1); 817e5c65c511d4 Graf Yang 2010-10-27 549 b3689e14415a87 David Lechner 2023-09-29 550 ret = regmap_write(st->regmap, AD2S1210_REG_CONTROL, data); b3689e14415a87 David Lechner 2023-09-29 551 if (ret < 0) 817e5c65c511d4 Graf Yang 2010-10-27 552 goto error_ret; 817e5c65c511d4 Graf Yang 2010-10-27 553 b19e9ad5e2cb91 Jonathan Cameron 2011-06-27 554 ret = ad2s1210_update_frequency_control_word(st); b19e9ad5e2cb91 Jonathan Cameron 2011-06-27 555 if (ret < 0) b19e9ad5e2cb91 Jonathan Cameron 2011-06-27 556 goto error_ret; b19e9ad5e2cb91 Jonathan Cameron 2011-06-27 557 ret = ad2s1210_soft_reset(st); 817e5c65c511d4 Graf Yang 2010-10-27 558 error_ret: 817e5c65c511d4 Graf Yang 2010-10-27 559 mutex_unlock(&st->lock); 817e5c65c511d4 Graf Yang 2010-10-27 @560 return ret; 817e5c65c511d4 Graf Yang 2010-10-27 561 }
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki