All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff LaBundy <jeff@labundy.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-input@vger.kernel.org
Subject: Re: [bug report] Input: add support for Azoteq IQS7222A/B/C
Date: Sun, 17 Apr 2022 13:28:55 -0500	[thread overview]
Message-ID: <20220417182855.GA4789@nixie71> (raw)
In-Reply-To: <20220412093039.GO12805@kadam>

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

      reply	other threads:[~2022-04-17 18:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-12  7:59 [bug report] Input: add support for Azoteq IQS7222A/B/C Dan Carpenter
2022-04-12  8:01 ` Dan Carpenter
2022-04-12  9:22   ` Jeff LaBundy
2022-04-12  9:30     ` Dan Carpenter
2022-04-17 18:28       ` Jeff LaBundy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220417182855.GA4789@nixie71 \
    --to=jeff@labundy.com \
    --cc=dan.carpenter@oracle.com \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.