Skip to content

Commit

Permalink
usb: phy: msm: Properly check result from platform_get_irq()
Browse files Browse the repository at this point in the history
Function return negative code on error.

Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Ivan T. Ivanov authored and Felipe Balbi committed Apr 30, 2014
1 parent f5ef237 commit f60c114
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/phy/phy-msm-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1413,7 +1413,7 @@ static int msm_otg_probe(struct platform_device *pdev)
dev_info(&pdev->dev, "OTG regs = %p\n", motg->regs);

motg->irq = platform_get_irq(pdev, 0);
if (!motg->irq) {
if (motg->irq < 0) {
dev_err(&pdev->dev, "platform_get_irq failed\n");
return motg->irq;
}
Expand Down

0 comments on commit f60c114

Please sign in to comment.