提交 f4693b08 编写于 作者: D Dan Carpenter 提交者: Felipe Balbi

usb: gadget: fsl_qe_udc: signedness bug in qe_get_frame()

We can't assign -EINVAL to a u16.

Fixes: 3948f0e0 ('usb: add Freescale QE/CPM USB peripheral controller driver')
Acked-by: NPeter Chen <peter.chen@nxp.com>
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
上级 80d1642d
......@@ -1878,11 +1878,8 @@ static int qe_get_frame(struct usb_gadget *gadget)
tmp = in_be16(&udc->usb_param->frame_n);
if (tmp & 0x8000)
tmp = tmp & 0x07ff;
else
tmp = -EINVAL;
return (int)tmp;
return tmp & 0x07ff;
return -EINVAL;
}
static int fsl_qe_start(struct usb_gadget *gadget,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册