Hi Matti,
url:
https://github.com/0day-ci/linux/commits/Matti-Vaittinen/Extend-regulator...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
config: x86_64-randconfig-m001-20210209 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/regulator/irq_helpers.c:194 regulator_notifier_isr() error: uninitialized symbol
'ret'.
vim +/ret +194 drivers/regulator/irq_helpers.c
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 155 static irqreturn_t
regulator_notifier_isr(int irq, void *data)
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 156 {
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 157 struct regulator_irq *h = data;
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 158 struct regulator_irq_desc *d;
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 159 struct regulator_irq_data *rid;
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 160 unsigned long rdev_map = 0;
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 161 int num_rdevs;
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 162 int ret, i, j;
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 163
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 164 d = &h->desc;
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 165 rid = &h->rdata;
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 166 num_rdevs = rid->num_states;
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 167
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 168 if (d->fatal_cnt)
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 169 h->retry_cnt++;
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 170
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 171 /*
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 172 * we spare few cycles by not clearing
statuses prior this call.
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 173 * The IC driver must initialize the
status buffers for rdevs
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 174 * which it indicates having active
events via rdev_map.
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 175 *
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 176 * Maybe we should just to be on a safer
side(?)
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 177 */
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 178 if (d->map_event)
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 179 ret = d->map_event(irq, rid,
&rdev_map);
"ret" not initialized on else path.
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 180
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 181 /*
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 182 * If status reading fails (which is
unlikely) we don't ack/disable
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 183 * IRQ but just increase fail count and
retry when IRQ fires again.
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 184 * If retry_count exceeds given safety
limit we call IC specific die
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 185 * handler which can try disabling
regulator(s).
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 186 *
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 187 * If no die handler is given we will
just bug() as a last resort.
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 188 *
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 189 * We could try disabling all associated
rdevs - but we might shoot
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 190 * ourself in the head and leave
problematic regulator enabled. So
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 191 * if IC has no die-handler populated we
just assume the regulator
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 192 * can't be disabled.
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 193 */
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 @194 if (unlikely(ret ==
REGULATOR_FAILED_RETRY))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 195 goto fail_out;
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 196
1844ad67f3ebe1 Matti Vaittinen 2021-02-11 197 h->retry_cnt = 0;
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org