Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

phy-sun4i-usb: Fix irq free conditions to match request conditions

commit 5cf700ac9d50 ("phy: phy-sun4i-usb: Fix optional gpios failing
probe")
changed the condition under which irqs are requested, but omitted matching
changes to sun4i_usb_phy_remove(). This commit fixes this.

Fixes: 5cf700ac9d50 ("phy: phy-sun4i-usb: Fix optional gpios failing probe")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>

authored by

Hans de Goede and committed by
Kishon Vijay Abraham I
04e59a02 6c081ff6

+2 -2
+2 -2
drivers/phy/phy-sun4i-usb.c
··· 514 514 515 515 if (data->vbus_power_nb_registered) 516 516 power_supply_unreg_notifier(&data->vbus_power_nb); 517 - if (data->id_det_irq >= 0) 517 + if (data->id_det_irq > 0) 518 518 devm_free_irq(dev, data->id_det_irq, data); 519 - if (data->vbus_det_irq >= 0) 519 + if (data->vbus_det_irq > 0) 520 520 devm_free_irq(dev, data->vbus_det_irq, data); 521 521 522 522 cancel_delayed_work_sync(&data->detect);