Skip to contentSkip to conversation

USB: c67x00-ll-hpi.c: signedness bug in ll_recv_msg()

PATCH In review Dan Carpenter 2 participants 2 messages Jan 18, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 USB: c67x00-ll-hpi.c: signedness bug in ll_recv_msg()

The callers expect this function to return zero on success or -EIO if it times out. The type should be int instead of unsigned short.

drivers/usb/c67x00/c67x00-ll-hpi.c +1 -1
index a9636f4..3a1ca4d 100644
@@ -237,7 +237,7 @@ void c67x00_ll_hpi_disable_sofeop(struct c67x00_sie *sie)
 /* -------------------------------------------------------------------------- */
 /* Transactions */
 
-static inline u16 ll_recv_msg(struct c67x00_device *dev)
+static inline int ll_recv_msg(struct c67x00_device *dev)
 {
 	u16 res;
 
Acked-by on v1 1/1
#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Dan" = Dan Carpenter <[email protected]> writes:

Dan> The callers expect this function to return zero on success or -EIO if it Dan> times out. The type should be int instead of unsigned short.

Dan> Signed-off-by: Dan Carpenter <[email protected]>

Dan> diff --git a/drivers/usb/c67x00/c67x00-ll-hpi.c b/drivers/usb/c67x00/c67x00-ll-hpi.c Dan> index a9636f4..3a1ca4d 100644
Dan> --- a/drivers/usb/c67x00/c67x00-ll-hpi.c
Dan> +++ b/drivers/usb/c67x00/c67x00-ll-hpi.c
Dan> @@ -237,7 +237,7 @@ void c67x00_ll_hpi_disable_sofeop(struct c67x00_sie *sie) Dan> /* -------------------------------------------------------------------------- */ Dan> /* Transactions */

Dan> -static inline u16 ll_recv_msg(struct c67x00_device *dev) Dan> +static inline int ll_recv_msg(struct c67x00_device *dev) Dan> {
Dan> u16 res;

Signature · 1 line
Bye, Peter Korsgaard