Skip to contentSkip to conversation

Patch "usb: gadget: fsl_qe_udc: signedness bug in qe_get_frame()" has been added to the 4.7-stable tree

PATCH [email protected] 1 participant 1 message Oct 5, 2016

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

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

to the 4.7-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
usb-gadget-fsl_qe_udc-signedness-bug-in-qe_get_frame.patch
and it can be found in the queue-4.7 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From f4693b08cc901912a87369c46537b94ed4084ea0 Mon Sep 17 00:00:00 2001

From: Dan Carpenter <[email protected]>
Date: Fri, 15 Jul 2016 14:15:47 +0300
Subject: usb: gadget: fsl_qe_udc: signedness bug in qe_get_frame()

From: Dan Carpenter <[email protected]>

commit f4693b08cc901912a87369c46537b94ed4084ea0 upstream.

We can't assign -EINVAL to a u16.

Fixes 3948f0e0c999 ('usb: add Freescale QE/CPM USB peripheral controller driver')
---
 drivers/usb/gadget/udc/fsl_qe_udc.c |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/usb/gadget/udc/fsl_qe_udc.c +2 -5
@@ -1878,11 +1878,8 @@ static int qe_get_frame(struct usb_gadge
 
 	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,

Patches currently in stable-queue which might be from [email protected] are

queue-4.7/usb-gadget-fsl_qe_udc-signedness-bug-in-qe_get_frame.patch