Commit b59aeb1a authored by Yoshihiro Shimoda's avatar Yoshihiro Shimoda Committed by Vinod Koul

phy: renesas: rcar-gen3-usb2: exit if request_irq() failed

To avoid unexpected behaviors, it's better to exit if request_irq()
failed.
Suggested-by: default avatarVinod Koul <vkoul@kernel.org>
Signed-off-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/1594986297-12434-3-git-send-email-yoshihiro.shimoda.uh@renesas.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 08b0ad37
...@@ -419,8 +419,10 @@ static int rcar_gen3_phy_usb2_init(struct phy *p) ...@@ -419,8 +419,10 @@ static int rcar_gen3_phy_usb2_init(struct phy *p)
INIT_WORK(&channel->work, rcar_gen3_phy_usb2_work); INIT_WORK(&channel->work, rcar_gen3_phy_usb2_work);
ret = request_irq(channel->irq, rcar_gen3_phy_usb2_irq, ret = request_irq(channel->irq, rcar_gen3_phy_usb2_irq,
IRQF_SHARED, dev_name(channel->dev), channel); IRQF_SHARED, dev_name(channel->dev), channel);
if (ret < 0) if (ret < 0) {
dev_err(channel->dev, "No irq handler (%d)\n", channel->irq); dev_err(channel->dev, "No irq handler (%d)\n", channel->irq);
return ret;
}
} }
/* Initialize USB2 part */ /* Initialize USB2 part */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment