Skip to contentSkip to conversation

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

PATCH In review Saurav Girepunje 2 participants 2 messages Oct 28, 2019 – Nov 4, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

As the "else if" and "else" branch body are identical the condition has no effect. So drop the "else if" condition.

---
 drivers/usb/isp1760/isp1760-hcd.c | 2 --
 1 file changed, 2 deletions(-)
drivers/usb/isp1760/isp1760-hcd.c +0 -2
index 320fc4739835..579a21bd70ad 100644
@@ -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 */
 /*
Signature · 1 line
2.20.1
maintainer
#1 lore raw
Quoted 13 lines · Saurav Girepunje

As the "else if" and "else" branch body are identical the condition has no effect. So drop the "else if" condition.

---
 drivers/usb/isp1760/isp1760-hcd.c | 2 --
 1 file changed, 2 deletions(-)
drivers/usb/isp1760/isp1760-hcd.c +0 -0
index 320fc4739835..579a21bd70ad 100644

drivers/usb/isp1760/isp1760-hcd.c static int check_atl_transfer(struct usb_hcd *hcd, struct ptd *ptd, · line 1036

Quoted 7 lines
drivers/usb/isp1760/isp1760-hcd.c +0 -2
@@ -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