usb: dwc_otg_310: fix smatch warnings relate to locking imbalance.
authorFrank Wang <frank.wang@rock-chips.com>
Mon, 31 Oct 2016 03:00:56 +0000 (11:00 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Mon, 31 Oct 2016 03:55:43 +0000 (11:55 +0800)
This patch corrects the below locking imbalance warnings:

drivers/usb/dwc_otg_310/dwc_otg_driver.c:406 dwc_otg_force_device()
warn: inconsistent returns 'irqsave:flags'.
  Locked on:   line 390
  Unlocked on: line 406

Change-Id: Id79ebe0d41fbbab38c59384e23d7e2133c436c96
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
drivers/usb/dwc_otg_310/dwc_otg_driver.c

index eaf6772..b2d5b7f 100644 (file)
@@ -386,6 +386,7 @@ void dwc_otg_force_device(dwc_otg_core_if_t *core_if)
        local_irq_save(flags);
 
        if (core_if->op_state == B_PERIPHERAL) {
+               local_irq_restore(flags);
                printk
                    ("dwc_otg_force_device,already in B_PERIPHERAL,everest\n");
                return;