Re: [PATCH] power: supply: axp20x_usb_power: Init work before enabling IRQs

2021-01-27 Thread Sebastian Reichel
Hi, On Sun, Jan 24, 2021 at 09:24:21AM -0600, Samuel Holland wrote: > The IRQ handler calls mod_delayed_work() on power->vbus_detect. However, > that work item is not initialized until after the IRQs are enabled. If > an IRQ is already pending when the driver is probed, the driver calls > mod_dela

Re: [PATCH] power: supply: axp20x_usb_power: Init work before enabling IRQs

2021-01-24 Thread Chen-Yu Tsai
On Sun, Jan 24, 2021 at 11:24 PM Samuel Holland wrote: > > The IRQ handler calls mod_delayed_work() on power->vbus_detect. However, > that work item is not initialized until after the IRQs are enabled. If > an IRQ is already pending when the driver is probed, the driver calls > mod_delayed_work()

[PATCH] power: supply: axp20x_usb_power: Init work before enabling IRQs

2021-01-24 Thread Samuel Holland
The IRQ handler calls mod_delayed_work() on power->vbus_detect. However, that work item is not initialized until after the IRQs are enabled. If an IRQ is already pending when the driver is probed, the driver calls mod_delayed_work() on an uninitialized work item, which causes an oops. Fixes: bcfb7