Skip to content

Commit

Permalink
usb: gadget: udc: Remove useless variable assignment in xudc_read_fifo()
Browse files Browse the repository at this point in the history
This patch removes the unused variables assignment warning.
Value assigned to variable bufferspace is overwritten, before
it can be used. This makes such variable assignment useless.

Reported Coverity warning: UNUSED_VALUE

Signed-off-by: Piyush Mehta <piyush.mehta@xilinx.com>
Link: https://lore.kernel.org/r/20220506175349.10102-1-piyush.mehta@xilinx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Piyush Mehta authored and Greg Kroah-Hartman committed May 12, 2022
1 parent b92d8a6 commit b4b4489
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/gadget/udc/udc-xilinx.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ static int xudc_read_fifo(struct xusb_ep *ep, struct xusb_req *req)
dev_dbg(udc->dev, "read %s, %d bytes%s req %p %d/%d\n",
ep->ep_usb.name, count, is_short ? "/S" : "", req,
req->usb_req.actual, req->usb_req.length);
bufferspace -= count;

/* Completion */
if ((req->usb_req.actual == req->usb_req.length) || is_short) {
if (udc->dma_enabled && req->usb_req.length)
Expand Down

0 comments on commit b4b4489

Please sign in to comment.