SUPERH platform development
 help / color / mirror / Atom feed
From: "Shimoda, Yoshihiro" <yoshihiro.shimoda.uh@renesas.com>
To: linux-sh@vger.kernel.org
Subject: Re: usb: ehci-sh: fix illegal phy_init() running when platform_data is NULL
Date: Tue, 12 Jun 2012 00:23:00 +0000	[thread overview]
Message-ID: <4FD68BE4.2060401@renesas.com> (raw)
In-Reply-To: <4FD5AF09.7060707@renesas.com>

2012/06/11 22:53, Alan Stern wrote:
> On Mon, 11 Jun 2012, Shimoda, Yoshihiro wrote:
> 
>> If the platform_data is not set, pdata will be uninitialized value.
>> Then, the phy_init() may run on illegal address.
> 
> I don't see how this patch fixes that problem.

The driver has the following code:

	if (pdata && pdata->phy_init)
		pdata->phy_init();

So, if the condition is true when the pdata is uninitialize value,
the driver may jump the illegal pdata->phy_init().

I will modify this patch to add this patch description.

>> This patch also fixes the following warning:
>>
>>   CC      drivers/usb/host/ehci-hcd.o
>> drivers/usb/host/ehci-sh.c: In function ‘ehci_hcd_sh_probe’:
>> drivers/usb/host/ehci-sh.c:104: warning: ‘pdata’ may be used uninitialized in this function
> 
> That alone is a good enough reason to accept the patch.  You might want
> to update the patch description, though.
> 
< snip >
> 
> Acked-by: Alan Stern <stern@rowland.harvard.edu>
> 

Thank you for the Acked-by:

Best regards,
Yoshihiro Shimoda

      parent reply	other threads:[~2012-06-12  0:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-11  8:40 usb: ehci-sh: fix illegal phy_init() running when platform_data is NULL Shimoda, Yoshihiro
2012-06-11 13:53 ` Alan Stern
2012-06-12  0:23 ` Shimoda, Yoshihiro [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=4FD68BE4.2060401@renesas.com \
    --to=yoshihiro.shimoda.uh@renesas.com \
    --cc=linux-sh@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