Commit 4cda340a authored by Tang Bin's avatar Tang Bin Committed by Felipe Balbi
Browse files

usb: gadget: fsl: Fix a wrong judgment in fsl_udc_probe()



If the function "platform_get_irq()" failed, the negative value
returned will not be detected here, including "-EPROBE_DEFER", which
causes the application to fail to get the correct error message.
Thus it must be fixed.

Acked-by: default avatarLi Yang <leoyang.li@nxp.com>
Signed-off-by: default avatarTang Bin <tangbin@cmss.chinamobile.com>
Signed-off-by: default avatarShengju Zhang <zhangshengju@cmss.chinamobile.com>
Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
parent 44734a59
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2440,8 +2440,8 @@ static int fsl_udc_probe(struct platform_device *pdev)
	udc_controller->max_ep = (dccparams & DCCPARAMS_DEN_MASK) * 2;

	udc_controller->irq = platform_get_irq(pdev, 0);
	if (!udc_controller->irq) {
		ret = -ENODEV;
	if (udc_controller->irq <= 0) {
		ret = udc_controller->irq ? : -ENODEV;
		goto err_iounmap;
	}