소스 검색

usb: musb: gadget: kill duplicate code in musb_gadget_queue()

musb_gadget_queue() checks for '!req->buf' condition twice:
in the second case the code is both duplicated and unreachable
as the first check returns early.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Sergei Shtylyov 15 년 전
부모
커밋
0739702105
1개의 변경된 파일0개의 추가작업 그리고 2개의 파일을 삭제
  1. 0 2
      drivers/usb/musb/musb_gadget.c

+ 0 - 2
drivers/usb/musb/musb_gadget.c

@@ -1169,8 +1169,6 @@ static int musb_gadget_queue(struct usb_ep *ep, struct usb_request *req,
 						: DMA_FROM_DEVICE);
 			request->mapped = 0;
 		}
-	} else if (!req->buf) {
-		return -ENODATA;
 	} else
 		request->mapped = 0;