Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: gadget: udc: Remove useless variable assignment in xudc_read_fifo()

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>

authored by

Piyush Mehta and committed by
Greg Kroah-Hartman
b4b44897 b92d8a6e

+1 -1
+1 -1
drivers/usb/gadget/udc/udc-xilinx.c
··· 632 632 dev_dbg(udc->dev, "read %s, %d bytes%s req %p %d/%d\n", 633 633 ep->ep_usb.name, count, is_short ? "/S" : "", req, 634 634 req->usb_req.actual, req->usb_req.length); 635 - bufferspace -= count; 635 + 636 636 /* Completion */ 637 637 if ((req->usb_req.actual == req->usb_req.length) || is_short) { 638 638 if (udc->dma_enabled && req->usb_req.length)