OSDN Git Service

usb: wusbcore: remove excessive irqsave
authorJohn Ogness <john.ogness@linutronix.de>
Sun, 24 Jun 2018 22:08:41 +0000 (00:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Jun 2018 10:36:06 +0000 (19:36 +0900)
commit7375fc9f5f162e783661ee9cdb85a62ec5f6b6d5
tree714cee3a393adf37a83a6ec78fa7136454ca2207
parent8982c8440f564549261fb80ca3fe1e3266635936
usb: wusbcore: remove excessive irqsave

wa_urb_dequeue() locks multiple spinlocks while disabling interrupts:

   spin_lock_irqsave(&lock1, flags);
   spin_lock_irqsave(&lock2, flags2);

Obviously there is no need for the second irqsave and "flags2" variable
since interrupts are disabled at that point. Remove the second irqsave:

   spin_lock_irqsave(&lock1, flags);
   spin_lock(&lock2);

and eliminate the flags2 variable.

Signed-off-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/wusbcore/wa-xfer.c