1
0
Fork 0

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: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/1594986297-12434-3-git-send-email-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
zero-sugar-mainline-defconfig
Yoshihiro Shimoda 2020-07-17 20:44:57 +09:00 committed by Vinod Koul
parent 08b0ad375c
commit b59aeb1a59
1 changed files with 3 additions and 1 deletions

View File

@ -419,8 +419,10 @@ static int rcar_gen3_phy_usb2_init(struct phy *p)
INIT_WORK(&channel->work, rcar_gen3_phy_usb2_work);
ret = request_irq(channel->irq, rcar_gen3_phy_usb2_irq,
IRQF_SHARED, dev_name(channel->dev), channel);
if (ret < 0)
if (ret < 0) {
dev_err(channel->dev, "No irq handler (%d)\n", channel->irq);
return ret;
}
}
/* Initialize USB2 part */