[PATCH 08/11] usb: gadget: fsl_udc: remove always-true null pointer checks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



struct fsl_ep's name member can never be NULL because it is a character
array. Remove these superfluous null pointer checks.

Signed-off-by: Ahmad Fatoum <ahmad@xxxxxx>
---
 drivers/usb/gadget/fsl_udc.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/usb/gadget/fsl_udc.c b/drivers/usb/gadget/fsl_udc.c
index a47ba20f469f..a44c7abc018b 100644
--- a/drivers/usb/gadget/fsl_udc.c
+++ b/drivers/usb/gadget/fsl_udc.c
@@ -1422,8 +1422,7 @@ static void udc_reset_ep_queue(struct fsl_udc *udc, u8 pipe)
 {
 	struct fsl_ep *ep = get_ep_by_pipe(udc, pipe);
 
-	if (ep->name)
-		nuke(ep, -ESHUTDOWN);
+	nuke(ep, -ESHUTDOWN);
 }
 
 /* Clear up all ep queues */
@@ -1914,12 +1913,6 @@ static void dtd_complete_irq(struct fsl_udc *udc)
 
 		curr_ep = get_ep_by_pipe(udc, i);
 
-		/* If the ep is configured */
-		if (curr_ep->name == NULL) {
-			WARNING("Invalid EP?");
-			continue;
-		}
-
 		/* process the req queue until an uncomplete request */
 		list_for_each_entry_safe(curr_req, temp_req, &curr_ep->queue,
 				queue) {
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux