usb: isp1760: isp1760-hcd.c: Drop condition with no effect
Subsystems (2)
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.
Signed-off-by Saurav Girepunje <[email protected]>
--- drivers/usb/isp1760/isp1760-hcd.c | 2 -- 1 file changed, 2 deletions(-)
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 *//*
Signature · 1 line
2.20.1
Greg KH
maintainerQuoted 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.
Signed-off-by Saurav Girepunje <[email protected]>--- drivers/usb/isp1760/isp1760-hcd.c | 2 -- 1 file changed, 2 deletions(-)drivers/usb/isp1760/isp1760-hcd.c +0
-0
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