Skip to contentSkip to conversation

staging: octeon-usb: Remove unnecessary assignment

PATCH New Rehas Sachdeva 1 participant 1 message Sep 21, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: octeon-usb: Remove unnecessary assignment

Remove 'x=a;' from a consecutive double assignment of the form 'x=a; x=b;'. Issue detected by the semantic patch found here:
https://github.com/coccinelle/coccinellery/blob/master/write2/write2.cocci

---
 drivers/staging/octeon-usb/octeon-hcd.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/octeon-usb/octeon-hcd.c +0 -1
index 17442b3..9a7858a 100644
@@ -3292,7 +3292,6 @@ static int octeon_usb_hub_status_data(struct usb_hcd *hcd, char *buf)
 	spin_lock_irqsave(&usb->lock, flags);
 	port_status = cvmx_usb_get_status(usb);
 	spin_unlock_irqrestore(&usb->lock, flags);
-	buf[0] = 0;
 	buf[0] = port_status.connect_change << 1;
 
 	return buf[0] != 0;
Signature · 1 line
2.7.4