linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: gadget: udc: Remove useless variable assignment in xudc_read_fifo()
@ 2022-05-06 17:53 Piyush Mehta
  0 siblings, 0 replies; only message in thread
From: Piyush Mehta @ 2022-05-06 17:53 UTC (permalink / raw)
  To: balbi, gregkh, Michal Simek, shubhrajyoti.datta, lee.jones,
	christophe.jaillet, szymon.heidrich, jakobkoschel, linux-usb,
	linux-arm-kernel, linux-kernel
  Cc: radheys, git, sivadur, Piyush Mehta

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>
---
 drivers/usb/gadget/udc/udc-xilinx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/udc-xilinx.c b/drivers/usb/gadget/udc/udc-xilinx.c
index 9369801..adfa1ab 100644
--- a/drivers/usb/gadget/udc/udc-xilinx.c
+++ b/drivers/usb/gadget/udc/udc-xilinx.c
@@ -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)
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-06 17:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-06 17:53 [PATCH] usb: gadget: udc: Remove useless variable assignment in xudc_read_fifo() Piyush Mehta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).