]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
phy-sun4i-usb: Fix irq free conditions to match request conditions
authorHans de Goede <hdegoede@redhat.com>
Sat, 18 Jun 2016 09:31:33 +0000 (11:31 +0200)
committerKishon Vijay Abraham I <kishon@ti.com>
Wed, 22 Jun 2016 06:03:46 +0000 (11:33 +0530)
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>
drivers/phy/phy-sun4i-usb.c

index 739029430dda71030162336bb795848dae35f54a..de3101fbbf40e1f3c77e7a1f22c6929c2db8fb01 100644 (file)
@@ -514,9 +514,9 @@ static int sun4i_usb_phy_remove(struct platform_device *pdev)
 
        if (data->vbus_power_nb_registered)
                power_supply_unreg_notifier(&data->vbus_power_nb);
-       if (data->id_det_irq >= 0)
+       if (data->id_det_irq > 0)
                devm_free_irq(dev, data->id_det_irq, data);
-       if (data->vbus_det_irq >= 0)
+       if (data->vbus_det_irq > 0)
                devm_free_irq(dev, data->vbus_det_irq, data);
 
        cancel_delayed_work_sync(&data->detect);