[PATCH] drivers/net/usb: remove redundant status variable
From: cgel . zte
Date: Mon Jan 10 2022 - 05:45:35 EST
From: Minghao Chi <chi.minghao@xxxxxxxxxx>
Return value from sierra_net_send_cmd() directly instead
of taking this in another redundant variable.
Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
Signed-off-by: Minghao Chi <chi.minghao@xxxxxxxxxx>
Signed-off-by: CGEL ZTE <cgel.zte@xxxxxxxxx>
---
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