mirror of https://gitee.com/openkylin/linux.git
Fix the possible kernel panic when the hardware signal is bad for chipidea udc.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJX0oXaAAoJEEhZKYFQ1nG7298H/RKxcA44iet+zvv8z8EX2yZt /H26bzu1/5S6GilXmI92KdEdpNgT1bBwp1ZqrGmMh9Zoi13X1aJJEnQGiyn9kxwK VHNb8UZ7OT2M6Sqf29zlrNfK6zxh3ou8UMK7Gv3YHjL1s0nFtkCsED4vdbisIMnj UuHzkT5C9l/mnJPhM9G44vXOwJFEZhWdfL5D+KSIi5JlMuBj0z9FZkGiSnchqrzb IbQvoPWjt+eUCkktTY8yEIU8RThqzVRJrqjeT3TBt3wYZHfCqvVnmCc81QpxvBub ZIJ1vhPd8zjP/FO6zMD//Rt/B4aTTodqWPtU5EaLwSkYASDBBYJunpyzZWZ+B7s= =TwAO -----END PGP SIGNATURE----- Merge tag 'usb-ci-v4.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-linus Peter writes: Fix the possible kernel panic when the hardware signal is bad for chipidea udc.
This commit is contained in:
commit
1b49dae1ca
|
@ -949,6 +949,15 @@ static int isr_setup_status_phase(struct ci_hdrc *ci)
|
|||
int retval;
|
||||
struct ci_hw_ep *hwep;
|
||||
|
||||
/*
|
||||
* Unexpected USB controller behavior, caused by bad signal integrity
|
||||
* or ground reference problems, can lead to isr_setup_status_phase
|
||||
* being called with ci->status equal to NULL.
|
||||
* If this situation occurs, you should review your USB hardware design.
|
||||
*/
|
||||
if (WARN_ON_ONCE(!ci->status))
|
||||
return -EPIPE;
|
||||
|
||||
hwep = (ci->ep0_dir == TX) ? ci->ep0out : ci->ep0in;
|
||||
ci->status->context = ci;
|
||||
ci->status->complete = isr_setup_status_complete;
|
||||
|
|
Loading…
Reference in New Issue