diff mbox

wireless: at76c50x: signedness bug in at76_dfu_get_state()

Message ID 20120809065730.GA7925@elgon.mountain (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Dan Carpenter Aug. 9, 2012, 6:57 a.m. UTC
This return holds the number of bytes transfered (1 byte) or a negative
error code.  The type should be int instead of u8.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Pavel Roskin Aug. 9, 2012, 9:18 p.m. UTC | #1
On Thu, 9 Aug 2012 09:57:30 +0300
Dan Carpenter <dan.carpenter@oracle.com> wrote:

> This return holds the number of bytes transfered (1 byte) or a
> negative error code.  The type should be int instead of u8.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Pavel Roskin <proski@gnu.org>

Nice catch, thanks!
diff mbox

Patch

diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c
index efc162e..88b8d64 100644
--- a/drivers/net/wireless/at76c50x-usb.c
+++ b/drivers/net/wireless/at76c50x-usb.c
@@ -342,7 +342,7 @@  static int at76_dfu_get_status(struct usb_device *udev,
 	return ret;
 }
 
-static u8 at76_dfu_get_state(struct usb_device *udev, u8 *state)
+static int at76_dfu_get_state(struct usb_device *udev, u8 *state)
 {
 	int ret;