lkml.org 
[lkml]   [2021]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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, &regmap_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]
\
 
 \ /
  Last update: 2021-01-18 01:47    [W:0.058 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site