mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
USB: composite: Release spinlock before WARN()
if WARN() is called under spinlock, it will lead crash due to watchdog timeout. Hence fix it by releasing spinlock before calling WARN(). And also check cdev->config is NULL or not before calling WARN(). Change-Id: Iebd00932b94164e9f40aa6126a2352437b1141ed Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org> Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
This commit is contained in:
parent
a2839ca38b
commit
2e6480dbe7
1 changed files with 6 additions and 0 deletions
|
|
@ -2505,7 +2505,13 @@ void usb_composite_setup_continue(struct usb_composite_dev *cdev)
|
|||
spin_lock_irqsave(&cdev->lock, flags);
|
||||
|
||||
if (cdev->delayed_status == 0) {
|
||||
if (!cdev->config) {
|
||||
spin_unlock_irqrestore(&cdev->lock, flags);
|
||||
return;
|
||||
}
|
||||
spin_unlock_irqrestore(&cdev->lock, flags);
|
||||
WARN(cdev, "%s: Unexpected call\n", __func__);
|
||||
return;
|
||||
|
||||
} else if (--cdev->delayed_status == 0) {
|
||||
DBG(cdev, "%s: Completing delayed status\n", __func__);
|
||||
|
|
|
|||
Loading…
Reference in a new issue