Skip to contentSkip to conversation

net: usb: Remove unnecessary '0' values from hasdata

PATCH Applied Li kunyu 2 participants 2 messages Jul 1, 2022 – Jul 3, 2022

Subsystems (4)
lore
Share & tools
lore

Li kunyu

author
#0 lore raw

PATCH 1/1 net: usb: Remove unnecessary '0' values from hasdata

hasdata does not need to be initialized to zero. It will be assigned a value in the following judgment conditions.

---
 drivers/net/usb/catc.c | 2 +-
 1 file changed, 1 insertions(+), 1 deletions(-)
drivers/net/usb/catc.c +1 -1
index e7fe9c0f63a9..268c32521691 100644
@@ -280,7 +280,7 @@ static void catc_irq_done(struct urb *urb)
 	struct catc *catc = urb->context;
 	u8 *data = urb->transfer_buffer;
 	int status = urb->status;
-	unsigned int hasdata = 0, linksts = LinkNoChange;
+	unsigned int hasdata, linksts = LinkNoChange;
 	int res;
 
 	if (!catc->is_f5u011) {
Signature · 1 line
2.18.2
#1 lore raw
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Quoted 7 lines · On Fri, 1 Jul 2022 15:18:02 +0800 you wrote:

hasdata does not need to be initialized to zero. It will be assigned a value in the following judgment conditions.

---
 drivers/net/usb/catc.c | 2 +-
 1 file changed, 1 insertions(+), 1 deletions(-)

Here is the summary with links:
- net: usb: Remove unnecessary '0' values from hasdata

    https://git.kernel.org/netdev/net-next/c/d0bf1fe6454e

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html