diff options
author | Jiri Kosina <jkosina@suse.cz> | 2012-06-18 11:08:08 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2012-06-18 11:08:30 -0400 |
commit | 1a8b294ce6b0cdab438175eed45ebb088bdd659a (patch) | |
tree | 11276ceea97f946329428398581e7642895b194f /drivers/hid | |
parent | 0a09d3ab3780aad9e64f1e45e56acf5b20bb82bf (diff) |
HID: uhid: silence gcc warning
gcc is giving me:
drivers/hid/uhid.c: In function ‘uhid_hid_get_raw’:
drivers/hid/uhid.c:157: warning: ‘len’ may be used uninitialized in this function
which is clearly bogus, as
- when used as memcpy() argument, it's initialized properly
- the code is structured in a way that either 'ret' or 'len'
is always initialized, so the return statement always has
an initialized value.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/uhid.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c index ea560bfa033d..119b7e6405be 100644 --- a/drivers/hid/uhid.c +++ b/drivers/hid/uhid.c | |||
@@ -154,7 +154,7 @@ static int uhid_hid_get_raw(struct hid_device *hid, unsigned char rnum, | |||
154 | struct uhid_event *ev; | 154 | struct uhid_event *ev; |
155 | unsigned long flags; | 155 | unsigned long flags; |
156 | int ret; | 156 | int ret; |
157 | size_t len; | 157 | size_t uninitialized_var(len); |
158 | struct uhid_feature_answer_req *req; | 158 | struct uhid_feature_answer_req *req; |
159 | 159 | ||
160 | if (!uhid->running) | 160 | if (!uhid->running) |