staging: octeon-usb: Remove unnecessary assignment
authorRehas Sachdeva <aquannie@gmail.com>
Wed, 21 Sep 2016 18:08:00 +0000 (23:38 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Sep 2016 09:54:48 +0000 (11:54 +0200)
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

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/octeon-usb/octeon-hcd.c

index 17442b3ed849de285528ea39f50b0fb74cb4d952..9a7858a300fd76dbb4c6b73d6143d6018b46d8d8 100644 (file)
@@ -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;