Skip to content

Commit

Permalink
phy-sun4i-usb: Fix irq free conditions to match request conditions
Browse files Browse the repository at this point in the history
commit 5cf700a ("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: 5cf700a ("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>
  • Loading branch information
Hans de Goede authored and Kishon Vijay Abraham I committed Jun 22, 2016
1 parent 6c081ff commit 04e59a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/phy/phy-sun4i-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 04e59a0

Please sign in to comment.