Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: cgel.zte@gmail.com
To: davem@davemloft.net
Cc: kuba@kernel.org, chi.minghao@zte.com.cn, andrew@lunn.ch,
	grundler@chromium.org, oneukum@suse.com,
	linux-usb@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, Zeal Robot <zealci@zte.com.cn>,
	CGEL ZTE <cgel.zte@gmail.com>
Subject: [PATCH] drivers/net/usb: remove redundant status variable
Date: Mon, 10 Jan 2022 10:44:02 +0000	[thread overview]
Message-ID: <20220110104402.646793-1-chi.minghao@zte.com.cn> (raw)

From: Minghao Chi <chi.minghao@zte.com.cn>

Return value from sierra_net_send_cmd() directly instead
of taking this in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@gmail.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


             reply	other threads:[~2022-01-10 10:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-10 10:44 cgel.zte [this message]
2022-01-10 10:55 ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220110104402.646793-1-chi.minghao@zte.com.cn \
    --to=cgel.zte@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=chi.minghao@zte.com.cn \
    --cc=davem@davemloft.net \
    --cc=grundler@chromium.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oneukum@suse.com \
    --cc=zealci@zte.com.cn \
    --subject='Re: [PATCH] drivers/net/usb: remove redundant status variable' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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