]> git.baikalelectronics.ru Git - kernel.git/commit
HID: uhid: silence gcc warning
authorJiri Kosina <jkosina@suse.cz>
Mon, 18 Jun 2012 15:08:08 +0000 (17:08 +0200)
committerJiri Kosina <jkosina@suse.cz>
Mon, 18 Jun 2012 15:08:30 +0000 (17:08 +0200)
commitb71367f37769d9d8935c82fc137891d5ba6f18af
tree11276ceea97f946329428398581e7642895b194f
parent1f6261e71e275ba13709a18f17287f4d41ca835f
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>
drivers/hid/uhid.c