提交 53f66686 编写于 作者: C Colin Ian King 提交者: Greg Kroah-Hartman

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: NColin Ian King <colin.king@canonical.com>
Addresses-Coverity: ("Unused value")
Link: https://lore.kernel.org/r/20210420110622.377339-1-colin.king@canonical.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 95dbac94
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册