diff options
author | Colin Ian King <colin.king@canonical.com> | 2021-04-20 14:06:22 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-04-22 11:52:15 +0300 |
commit | 53f666869db5d8bfdcb85709808708596b26f02f (patch) | |
tree | 6e2d1a392fb9e83096ea80c558b5399538858942 /drivers/usb/gadget/udc/net2272.c | |
parent | 95dbac94da7f9cff9a056fcf9c3a1679aa5ac337 (diff) | |
download | linux-53f666869db5d8bfdcb85709808708596b26f02f.tar.xz |
usb: gadget: net2272: remove redundant initialization of status
The variable status is being initialized with a value that is
never read and it is being updated later with a new value. The
initialization is redundant and can be removed and move the
declaration of status to the scope where it is used.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Addresses-Coverity: ("Unused value")
Link: https://lore.kernel.org/r/20210420110622.377339-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/gadget/udc/net2272.c')
-rw-r--r-- | drivers/usb/gadget/udc/net2272.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/gadget/udc/net2272.c b/drivers/usb/gadget/udc/net2272.c index 23a735641c3d..89f479b78d80 100644 --- a/drivers/usb/gadget/udc/net2272.c +++ b/drivers/usb/gadget/udc/net2272.c @@ -539,7 +539,6 @@ net2272_read_fifo(struct net2272_ep *ep, struct net2272_request *req) int count; int tmp; int cleanup = 0; - int status = -1; dev_vdbg(ep->dev->dev, "read_fifo %s actual %d len %d\n", ep->ep.name, req->req.actual, req->req.length); @@ -591,6 +590,8 @@ net2272_read_fifo(struct net2272_ep *ep, struct net2272_request *req) } if (!list_empty(&ep->queue)) { + int status; + req = list_entry(ep->queue.next, struct net2272_request, queue); status = net2272_kick_dma(ep, req); |