Re: [PATCH v2] usb: dwc3: host: remove dead code in dwc3_host_get_irq()

From: Dan Carpenter
Date: Thu Mar 23 2023 - 07:13:34 EST


On Thu, Mar 23, 2023 at 02:00:35PM +0300, Dan Carpenter wrote:
> irq = platform_get_irq(dwc3_pdev, 0);
> if (irq > 0) {
> dwc3_host_fill_xhci_irq_res(dwc, irq, NULL);
> - goto out;
> + return irq;
> }
>
> - if (!irq)
> - irq = -EINVAL;
> -
> -out:
> - return irq;
> + return -ENODEV;

Oh wait. We actually need to propagate the error code here because of
-EPROBE_DEFER so my patch introduces a bug.

regards,
dan carpenter