diff mbox series

usb: isp1760: isp1760-hcd.c: Drop condition with no effect

Message ID 20191028211214.GA30014@saurav (mailing list archive)
State Mainlined
Commit 233450310b6884c5fe4174e6229800b94f8a52c0
Headers show
Series usb: isp1760: isp1760-hcd.c: Drop condition with no effect | expand

Commit Message

Saurav Girepunje Oct. 28, 2019, 9:12 p.m. UTC
As the "else if" and "else" branch body are identical the condition
has no effect. So drop the "else if" condition.

Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
---
 drivers/usb/isp1760/isp1760-hcd.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Greg KH Nov. 4, 2019, 2:48 p.m. UTC | #1
On Tue, Oct 29, 2019 at 02:42:14AM +0530, Saurav Girepunje wrote:
> As the "else if" and "else" branch body are identical the condition
> has no effect. So drop the "else if" condition.
> 
> Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
> ---
>  drivers/usb/isp1760/isp1760-hcd.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/usb/isp1760/isp1760-hcd.c b/drivers/usb/isp1760/isp1760-hcd.c
> index 320fc4739835..579a21bd70ad 100644
> --- a/drivers/usb/isp1760/isp1760-hcd.c
> +++ b/drivers/usb/isp1760/isp1760-hcd.c
> @@ -1032,8 +1032,6 @@ static int check_atl_transfer(struct usb_hcd *hcd, struct ptd *ptd,
>  			urb->status = -EOVERFLOW;
>  		else if (FROM_DW3_CERR(ptd->dw3))
>  			urb->status = -EPIPE;  /* Stall */
> -		else if (ptd->dw3 & DW3_ERROR_BIT)
> -			urb->status = -EPROTO; /* XactErr */
>  		else
>  			urb->status = -EPROTO; /* Unknown */

Yes, the same thing happens, but look at the comment, this is two
different things.  So the code is good as-is.

thanks,

greg k-h
diff mbox series

Patch

diff --git a/drivers/usb/isp1760/isp1760-hcd.c b/drivers/usb/isp1760/isp1760-hcd.c
index 320fc4739835..579a21bd70ad 100644
--- a/drivers/usb/isp1760/isp1760-hcd.c
+++ b/drivers/usb/isp1760/isp1760-hcd.c
@@ -1032,8 +1032,6 @@  static int check_atl_transfer(struct usb_hcd *hcd, struct ptd *ptd,
 			urb->status = -EOVERFLOW;
 		else if (FROM_DW3_CERR(ptd->dw3))
 			urb->status = -EPIPE;  /* Stall */
-		else if (ptd->dw3 & DW3_ERROR_BIT)
-			urb->status = -EPROTO; /* XactErr */
 		else
 			urb->status = -EPROTO; /* Unknown */
 /*