linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: gadget: udc-xilinx: remove useless variable assignment in xudc_read_fifo()
@ 2017-06-27 21:30 Gustavo A. R. Silva
  2017-06-27 22:42 ` Sören Brinkmann
  0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2017-06-27 21:30 UTC (permalink / raw)
  To: Felipe Balbi, Greg Kroah-Hartman, Michal Simek, Sören Brinkmann
  Cc: linux-usb, linux-arm-kernel, linux-kernel, Gustavo A. R. Silva

Value assigned to variable bufferspace at line 637 is overwritten
at line 613, before it can be used. This makes such variable
assignment useless.

Addresses-Coverity-ID: 1397677
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 drivers/usb/gadget/udc/udc-xilinx.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/udc-xilinx.c b/drivers/usb/gadget/udc/udc-xilinx.c
index de207a9..7afdf8e 100644
--- a/drivers/usb/gadget/udc/udc-xilinx.c
+++ b/drivers/usb/gadget/udc/udc-xilinx.c
@@ -634,7 +634,6 @@ 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.5.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] usb: gadget: udc-xilinx: remove useless variable assignment in xudc_read_fifo()
  2017-06-27 21:30 [PATCH] usb: gadget: udc-xilinx: remove useless variable assignment in xudc_read_fifo() Gustavo A. R. Silva
@ 2017-06-27 22:42 ` Sören Brinkmann
  0 siblings, 0 replies; 2+ messages in thread
From: Sören Brinkmann @ 2017-06-27 22:42 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Felipe Balbi, Greg Kroah-Hartman, Michal Simek, linux-usb,
	linux-arm-kernel, linux-kernel

On Tue, 2017-06-27 at 16:30:30 -0500, Gustavo A. R. Silva wrote:
> Value assigned to variable bufferspace at line 637 is overwritten
> at line 613, before it can be used. This makes such variable
> assignment useless.
> 
> Addresses-Coverity-ID: 1397677
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Reviewed-by: Sören Brinkmann <soren.brinkmann@xilinx.com>

	Sören

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-27 22:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-27 21:30 [PATCH] usb: gadget: udc-xilinx: remove useless variable assignment in xudc_read_fifo() Gustavo A. R. Silva
2017-06-27 22:42 ` Sören Brinkmann

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).