usb: musb: musb_host.c: Cleaning up uninitialized variables
authorRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Sun, 1 Jun 2014 13:48:12 +0000 (15:48 +0200)
committerFelipe Balbi <balbi@ti.com>
Mon, 30 Jun 2014 17:27:01 +0000 (12:27 -0500)
There is a risk that the variable will be used without being initialized.

This was largely found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/musb/musb_host.c

index eb06291a40c8776153782edbbee0784231946e60..3b11f98f3a56571c801dbb9fe15b4f6d1243477e 100644 (file)
@@ -1957,7 +1957,7 @@ static int musb_schedule(
        struct musb_qh          *qh,
        int                     is_in)
 {
-       int                     idle;
+       int                     idle = 0;
        int                     best_diff;
        int                     best_end, epnum;
        struct musb_hw_ep       *hw_ep = NULL;