linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Colin King <colin.king@canonical.com>
Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	linux-i2c@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i2c: designware-baytrail: fix potential null pointer dereference on dev
Date: Wed, 19 Apr 2017 21:01:22 +0200	[thread overview]
Message-ID: <20170419190122.qoudvukbgioxoy3l@ninjato> (raw)
In-Reply-To: <20170320115123.31536-1-colin.king@canonical.com>

[-- Attachment #1: Type: text/plain, Size: 632 bytes --]

On Mon, Mar 20, 2017 at 11:51:23AM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The assignment to addr requires a call to get_sem_addr that dereferences
> dev, however, this dereference occurs before a null pointer check on dev.
> Move this assignment after the null check on dev to avoid a potential null
> pointer dereference.
> 
> Detected by CoverityScan, CID#1419700 ("Dereference before null check")
> 
> Fixes: fd476fa22a1f432 ("i2c: designware-baytrail: Add support for cherrytrail")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied to for-next, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2017-04-19 19:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-20 11:51 [PATCH] i2c: designware-baytrail: fix potential null pointer dereference on dev Colin King
2017-04-19 19:01 ` Wolfram Sang [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=20170419190122.qoudvukbgioxoy3l@ninjato \
    --to=wsa@the-dreams.de \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=colin.king@canonical.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    /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).