Messages in this thread | | | Date | Mon, 18 Jan 2021 01:43:38 +0100 | From | Jonathan Neuschäfer <> | Subject | Re: [PATCH v8 3/7] mfd: Add base driver for Netronix embedded controller |
| |
On Sun, Jan 17, 2021 at 09:22:01AM +0800, kernel test robot wrote: [...] > >> drivers/mfd/ntxec.c:127:10: warning: variable 'res' is uninitialized when used here [-Wuninitialized] > return res; > ^~~ > drivers/mfd/ntxec.c:116:9: note: initialize the variable 'res' to silence this warning > int res; > ^ > = 0 > 1 warning generated. [...] > 124 ec->regmap = devm_regmap_init_i2c(client, ®map_config); > 125 if (IS_ERR(ec->regmap)) { > 126 dev_err(ec->dev, "Failed to set up regmap for device\n"); > > 127 return res; > 128 }
Ah well, that's a bug (present since v2 of the patchset). The return statement should be:
return PTR_ERR(ec->regmap);
Thanks, Jonathan Neuschäfer [unhandled content-type:application/pgp-signature] | |