drivers/irqchip/irq-riscv-aplic-direct.c:202 aplic_direct_parse_parent_hwirq() error: uninitialized symbol 'rc'.
PATCH 48/54 drivers/irqchip/irq-riscv-aplic-direct.c:202 aplic_direct_parse_parent_hwirq() error: uninitialized symbol 'rc'.
tree: https://github.com/avpatel/linux.git riscv_acpi_b2_v6_610_rc1_full head: 0dea64cc13417fc07df1d97a05904896f59fb329 commit: 9e014be7064b9ad2b121d1970cb8f27ec009f960 [48/54] irqchip/riscv-aplic: Add ACPI support config: riscv-randconfig-r071-20240530 (https://download.01.org/0day-ci/archive/20240531/[email protected]/config) compiler: riscv64-linux-gcc (GCC) 13.2.0
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/irqchip/irq-riscv-aplic-direct.c:202 aplic_direct_parse_parent_hwirq() error: uninitialized symbol 'rc'.
vim +/rc +202 drivers/irqchip/irq-riscv-aplic-direct.c
2333df5ae51ead Anup Patel 2024-03-07 192 static int aplic_direct_parse_parent_hwirq(struct device *dev, u32 index,
9e014be7064b9a Sunil V L 2024-04-07 193 u32 *parent_hwirq, unsigned long *parent_hartid,
9e014be7064b9a Sunil V L 2024-04-07 194 struct aplic_priv *priv)
2333df5ae51ead Anup Patel 2024-03-07 195 {
2333df5ae51ead Anup Patel 2024-03-07 196 struct of_phandle_args parent;
9e014be7064b9a Sunil V L 2024-04-07 197 unsigned long hartid;
2333df5ae51ead Anup Patel 2024-03-07 198 int rc;
2333df5ae51ead Anup Patel 2024-03-07 199
9e014be7064b9a Sunil V L 2024-04-07 200 if (!is_of_node(dev->fwnode)) {
9e014be7064b9a Sunil V L 2024-04-07 201 hartid = acpi_get_ext_intc_parent_hartid(priv->id, index);9e014be7064b9a Sunil V L 2024-04-07 @202 if (rc)
if (hartid < 0)?
9e014be7064b9a Sunil V L 2024-04-07 203 return rc; 9e014be7064b9a Sunil V L 2024-04-07 204 9e014be7064b9a Sunil V L 2024-04-07 205 *parent_hartid = hartid; 9e014be7064b9a Sunil V L 2024-04-07 206 *parent_hwirq = RV_IRQ_EXT; 9e014be7064b9a Sunil V L 2024-04-07 207 return 0; 9e014be7064b9a Sunil V L 2024-04-07 208 } 2333df5ae51ead Anup Patel 2024-03-07 209 2333df5ae51ead Anup Patel 2024-03-07 210 rc = of_irq_parse_one(to_of_node(dev->fwnode), index, &parent); 2333df5ae51ead Anup Patel 2024-03-07 211 if (rc) 2333df5ae51ead Anup Patel 2024-03-07 212 return rc; 2333df5ae51ead Anup Patel 2024-03-07 213 2333df5ae51ead Anup Patel 2024-03-07 214 rc = riscv_of_parent_hartid(parent.np, parent_hartid); 2333df5ae51ead Anup Patel 2024-03-07 215 if (rc) 2333df5ae51ead Anup Patel 2024-03-07 216 return rc; 2333df5ae51ead Anup Patel 2024-03-07 217 2333df5ae51ead Anup Patel 2024-03-07 218 *parent_hwirq = parent.args[0]; 2333df5ae51ead Anup Patel 2024-03-07 219 return 0; 2333df5ae51ead Anup Patel 2024-03-07 220 }
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki