mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] usb: dwc3: host: remove dead code in dwc3_host_get_irq()
@ 2023-03-23  5:42 Mingxuan Xiang
  2023-03-23  9:01 ` Sergei Shtylyov
  0 siblings, 1 reply; 2+ messages in thread
From: Mingxuan Xiang @ 2023-03-23  5:42 UTC (permalink / raw)
  To: Thinh Nguyen, Greg Kroah-Hartman
  Cc: hust-os-kernel-patches, Dongliang Mu, Mingxuan Xiang, linux-usb,
	linux-kernel

platform_get_irq() no longer returns 0, so there is no
need to check whether the return value is 0.

Signed-off-by: Mingxuan Xiang <mx_xiang@hust.edu.cn>
---
 drivers/usb/dwc3/host.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c
index f6f13e7f1ba1..aa19c27344e6 100644
--- a/drivers/usb/dwc3/host.c
+++ b/drivers/usb/dwc3/host.c
@@ -57,9 +57,6 @@ static int dwc3_host_get_irq(struct dwc3 *dwc)
 		goto out;
 	}
 
-	if (!irq)
-		irq = -EINVAL;
-
 out:
 	return irq;
 }
-- 
2.39.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] usb: dwc3: host: remove dead code in dwc3_host_get_irq()
  2023-03-23  5:42 [PATCH] usb: dwc3: host: remove dead code in dwc3_host_get_irq() Mingxuan Xiang
@ 2023-03-23  9:01 ` Sergei Shtylyov
  0 siblings, 0 replies; 2+ messages in thread
From: Sergei Shtylyov @ 2023-03-23  9:01 UTC (permalink / raw)
  To: Mingxuan Xiang, Thinh Nguyen, Greg Kroah-Hartman
  Cc: hust-os-kernel-patches, Dongliang Mu, linux-usb, linux-kernel

On 3/23/23 8:42 AM, Mingxuan Xiang wrote:

> platform_get_irq() no longer returns 0, so there is no
> need to check whether the return value is 0.
> 
> Signed-off-by: Mingxuan Xiang <mx_xiang@hust.edu.cn>
> ---
>  drivers/usb/dwc3/host.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c
> index f6f13e7f1ba1..aa19c27344e6 100644
> --- a/drivers/usb/dwc3/host.c
> +++ b/drivers/usb/dwc3/host.c
> @@ -57,9 +57,6 @@ static int dwc3_host_get_irq(struct dwc3 *dwc)
>  		goto out;

   Shouldn't *goto* be dropped now?

>  	}
>  
> -	if (!irq)
> -		irq = -EINVAL;
> -
>  out:
>  	return irq;
>  }

MBR, Sergey

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-23  9:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-23  5:42 [PATCH] usb: dwc3: host: remove dead code in dwc3_host_get_irq() Mingxuan Xiang
2023-03-23  9:01 ` Sergei Shtylyov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®