summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/function/rndis.h
diff options
context:
space:
mode:
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>2015-05-18 17:40:04 +0200
committerFelipe Balbi <balbi@ti.com>2015-05-21 16:29:14 -0500
commit81dff8692865292aa70ec3fd93489ae9f33f709e (patch)
tree5bdc26bb459ae02e9be6dfbd9722b31ff4ca7c20 /drivers/usb/gadget/function/rndis.h
parentc0d96af2e0427cc90b1f0d3c6a5294d90f93fcf4 (diff)
downloadlinux-stable-81dff8692865292aa70ec3fd93489ae9f33f709e.tar.gz
linux-stable-81dff8692865292aa70ec3fd93489ae9f33f709e.tar.bz2
linux-stable-81dff8692865292aa70ec3fd93489ae9f33f709e.zip
usb: gadget: rndis: use signed type for a signed value
rndis_get_nr() returns either a non-negative value on success or a negative value on failure. In case of failure an error code is returned to the caller of rndis_register(). If the "i" is unsigned, the information about error from rndis_get_nr() is lost. If there is no error but rndis_get_nr() returns a value greater than 256 the least significant bits of i are zero effectively limiting the number of configs to 256. This patch fixes that. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/function/rndis.h')
-rw-r--r--drivers/usb/gadget/function/rndis.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/function/rndis.h b/drivers/usb/gadget/function/rndis.h
index 194abb130e49..ef92eb66d8ad 100644
--- a/drivers/usb/gadget/function/rndis.h
+++ b/drivers/usb/gadget/function/rndis.h
@@ -177,7 +177,7 @@ typedef struct rndis_resp_t
typedef struct rndis_params
{
- u8 confignr;
+ int confignr;
u8 used;
u16 saved_filter;
enum rndis_state state;