usb: gadget: fsl_qe_udc: signedness bug in qe_get_frame()
[pandora-kernel.git] / drivers / usb / gadget / fsl_qe_udc.c
index e00cf92..4e2b5a9 100644 (file)
@@ -1883,11 +1883,8 @@ static int qe_get_frame(struct usb_gadget *gadget)
 
        tmp = in_be16(&udc_controller->usb_param->frame_n);
        if (tmp & 0x8000)
-               tmp = tmp & 0x07ff;
-       else
-               tmp = -EINVAL;
-
-       return (int)tmp;
+               return tmp & 0x07ff;
+       return -EINVAL;
 }
 
 /* Tries to wake up the host connected to this gadget