archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/>
To: "Gustavo A. R. Silva" <garsilva-L1vi/>
Subject: Re: [PATCH] char: tpm: fix potential null pointer dereference
Date: Tue, 30 May 2017 16:21:19 -0600	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <20170530220520.GA8713@embeddedgus>

On Tue, May 30, 2017 at 05:05:20PM -0500, Gustavo A. R. Silva wrote:
> NULL check at line 376: if (!chip) {, implies chip might be NULL.
> Function dev_get_drvdata() dereference pointer chip.
> Move pointer tmp_dev assignment after the NULL check.

chip cannot be null in st33zp24_send, please remove the bogus if


Check out the vibrant tech community on one of the world's most
engaging tech sites,!

  reply	other threads:[~2017-05-30 22:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-30 22:05 [PATCH] char: tpm: fix potential null pointer dereference Gustavo A. R. Silva
2017-05-30 22:21 ` Jason Gunthorpe [this message]
2017-05-30 22:40   ` Gustavo A. R. Silva
2017-05-31  0:05     ` [PATCH] char: tpm: remove unnecessary code Gustavo A. R. Silva

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:

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

  git send-email \ \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/ \
    --cc=garsilva-L1vi/ \ \ \

* 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).