Hi Dan, On Tue, Apr 12, 2022 at 12:30:39PM +0300, Dan Carpenter wrote: > On Tue, Apr 12, 2022 at 04:22:51AM -0500, Jeff LaBundy wrote: > > Hi Dan, > > > > Thank you for reaching out. > > > > On Tue, Apr 12, 2022 at 11:01:23AM +0300, Dan Carpenter wrote: > > > There are a couple other warnings as well: > > > > > > drivers/input/misc/iqs7222.c:2214 iqs7222_parse_all() error: NULL dereference inside function 'iqs7222_parse_props() > > > drivers/input/misc/iqs7222.c:2234 iqs7222_parse_all() error: NULL dereference inside function 'iqs7222_parse_props() > > > > All three of these code paths are tested and do not lead to a crash; I > > am suspicious that the warnings are false positives. > > > > Are we looking at the same code. I am looking at linux-next. To me it > looks like the checker is obviously correct. Please accept my apology for the delayed response as well as the confusion from my side. Not surprisingly, both you and the tool are correct on all counts. > > 1530 static int iqs7222_parse_props(struct iqs7222_private *iqs7222, > 1531 struct fwnode_handle **child_node, > ^^^^^^^^^^^^ > child_node is NULL > > 1532 int child_index, > 1533 enum iqs7222_reg_grp_id reg_grp, > 1534 enum iqs7222_reg_key_id reg_key) > 1535 { > 1536 u16 *setup = iqs7222_setup(iqs7222, reg_grp, child_index); > 1537 struct fwnode_handle *reg_grp_node = *child_node; > ^ > Boom. Dead. What have I missed? This line was left over from some early development, and I simply missed it. The code is working on real hardware, so I imagine the compiler has simply optimized this out in favor of the subsequent reassignment. > > 1538 struct i2c_client *client = iqs7222->client; > 1539 char reg_grp_name[16]; > 1540 int i; > 1541 > > regards, > dan carpenter This is an easy fix and I will send out a patch shortly. Thank you for digging into this with me. Kind regards, Jeff LaBundy