linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: linux-input@vger.kernel.org, Ping Cheng <Ping.Cheng@wacom.com>,
	Jason Gerecke <Jason.Gerecke@wacom.com>
Subject: Re: HID: wacom: check for wacom->shared before following the pointer
Date: Thu, 19 Mar 2015 19:50:04 +0300	[thread overview]
Message-ID: <20150319165004.GV16501@mwanda> (raw)
In-Reply-To: <20150319160601.GC18134@mail.corp.redhat.com>

On Thu, Mar 19, 2015 at 12:06:02PM -0400, Benjamin Tissoires wrote:
> >   1101  
> >   1102          for (i = 0; i < contacts_to_send; i++) {
> >   1103                  int offset = (byte_per_packet * i) + 1;
> >   1104                  bool touch = (data[offset] & 0x1) && !wacom->shared->stylus_in_proximity;
> >                                                               ^^^^^^^^^^^^^
> > I assume this hardware is always quirky so this won't cause a NULL
> > deref?
> 
> Yes. 24hdt has the quirk WACOM_QUIRK_MULTI_INPUT, so wacom->shared can
> not be null. I wonder what we could put in the code to make static
> checkers happy...

The static checker doesn't complain about this, I was just wondering.

regards,
dan carpenter


      parent reply	other threads:[~2015-03-19 16:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-19 15:54 HID: wacom: check for wacom->shared before following the pointer Dan Carpenter
2015-03-19 16:06 ` Benjamin Tissoires
2015-03-19 16:41   ` Ping Cheng
2015-03-19 17:08     ` Benjamin Tissoires
2015-03-19 16:50   ` Dan Carpenter [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=20150319165004.GV16501@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=Jason.Gerecke@wacom.com \
    --cc=Ping.Cheng@wacom.com \
    --cc=benjamin.tissoires@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).