public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: LABBE Corentin <clabbe.montjoie@gmail.com>, <gregkh@linuxfoundation.org>
Cc: LABBE Corentin <clabbe.montjoie@gmail.com>,
	<linux-kernel@vger.kernel.org>, <linux-usb@vger.kernel.org>
Subject: Re: [PATCH] usb: phy: msm: fix a possible NULL dereference
Date: Mon, 16 Nov 2015 11:07:36 -0600	[thread overview]
Message-ID: <87lh9xna93.fsf@saruman.tx.rr.com> (raw)
In-Reply-To: <1447314323-30959-1-git-send-email-clabbe.montjoie@gmail.com>

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


Hi,

LABBE Corentin <clabbe.montjoie@gmail.com> writes:
> of_match_device could return NULL, and so cause a NULL pointer
> dereference later. Renaming id to of_id (like all others do) in the
> process.
>
> Reported-by: coverity (CID 1324133)
> Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
> ---
>  drivers/usb/phy/phy-msm-usb.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
> index 80eb991..c4a66cf 100644
> --- a/drivers/usb/phy/phy-msm-usb.c
> +++ b/drivers/usb/phy/phy-msm-usb.c
> @@ -1506,20 +1506,23 @@ static int msm_otg_read_dt(struct platform_device *pdev, struct msm_otg *motg)
>  {
>  	struct msm_otg_platform_data *pdata;
>  	struct extcon_dev *ext_id, *ext_vbus;
> -	const struct of_device_id *id;
> +	const struct of_device_id *of_id;

and why did you need to rename this variable ? Please resend without the
variable rename.

-- 
balbi

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

  reply	other threads:[~2015-11-16 17:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-12  7:45 [PATCH] usb: phy: msm: fix a possible NULL dereference LABBE Corentin
2015-11-16 17:07 ` Felipe Balbi [this message]
2015-11-16 19:18   ` Corentin LABBE
2015-11-16 19:23     ` Felipe Balbi

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=87lh9xna93.fsf@saruman.tx.rr.com \
    --to=balbi@ti.com \
    --cc=clabbe.montjoie@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@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