[PATCH 2/2] drivers: usb: gadget: udc: remove logically dead code

Gustavo A. R. Silva
2017-02-08T07:47:49Z

Remove unnecesary code because zlt never evaluates to zero.

Addresses-Coverity-ID: 1226747
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
drivers/usb/gadget/udc/mv_udc_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/mv_udc_core.c b/drivers/usb/gadget/udc/mv_udc_core.c
index 56b3574..9ca6d92 100644
--- a/drivers/usb/gadget/udc/mv_udc_core.c
+++ b/drivers/usb/gadget/udc/mv_udc_core.c
@@ -509,7 +509,7 @@ static int mv_ep_enable(struct usb_ep *_ep,
dqh = ep->dqh;
dqh->max_packet_length = (max << EP_QUEUE_HEAD_MAX_PKT_LEN_POS)
| (mult << EP_QUEUE_HEAD_MULT_POS)
- | (zlt ? EP_QUEUE_HEAD_ZLT_SEL : 0)
+ | EP_QUEUE_HEAD_ZLT_SEL
| (ios ? EP_QUEUE_HEAD_IOS : 0);
dqh->next_dtd_ptr = 1;
dqh->size_ioc_int_sts = 0;
--
2.5.0