Re: usb: ehci-sh: fix illegal phy_init() running when platform_data is NULL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx>
> 

Thank you for the Acked-by:

Best regards,
Yoshihiro Shimoda
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux