[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220110104402.646793-1-chi.minghao@zte.com.cn>
Date: Mon, 10 Jan 2022 10:44:02 +0000
From: cgel.zte@...il.com
To: davem@...emloft.net
Cc: kuba@...nel.org, chi.minghao@....com.cn, andrew@...n.ch,
grundler@...omium.org, oneukum@...e.com, linux-usb@...r.kernel.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
Zeal Robot <zealci@....com.cn>, CGEL ZTE <cgel.zte@...il.com>
Subject: [PATCH] drivers/net/usb: remove redundant status variable
From: Minghao Chi <chi.minghao@....com.cn>
Return value from sierra_net_send_cmd() directly instead
of taking this in another redundant variable.
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: Minghao Chi <chi.minghao@....com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@...il.com>
---
drivers/net/usb/sierra_net.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/usb/sierra_net.c b/drivers/net/usb/sierra_net.c
index bb4cbe8fc846..818ff8a24098 100644
--- a/drivers/net/usb/sierra_net.c
+++ b/drivers/net/usb/sierra_net.c
@@ -334,15 +334,12 @@ static int sierra_net_send_cmd(struct usbnet *dev,
static int sierra_net_send_sync(struct usbnet *dev)
{
- int status;
struct sierra_net_data *priv = sierra_net_get_private(dev);
dev_dbg(&dev->udev->dev, "%s", __func__);
- status = sierra_net_send_cmd(dev, priv->sync_msg,
+ return sierra_net_send_cmd(dev, priv->sync_msg,
sizeof(priv->sync_msg), "SYNC");
-
- return status;
}
static void sierra_net_set_ctx_index(struct sierra_net_data *priv, u8 ctx_ix)
--
2.25.1
Powered by blists - more mailing lists