mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
HID: Fix uninitialized variable "size" in hid-wiimote-debug
This variable is initialized conditionally, based on whether a wiimote call succeeds. However, the logic is not obvious to the compiler so it throws a warning. Eliminate the warning by initializing "size" to 0. The warning is: files/drivers/hid/hid-wiimote-debug.c:69:18: warning: 'size' may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Simon Que <[email protected]> Signed-off-by: David Herrmann <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
This commit is contained in:
parent
aaca9cc016
commit
b77a989acc
1 changed files with 1 additions and 1 deletions
|
|
@ -31,7 +31,7 @@ static ssize_t wiidebug_eeprom_read(struct file *f, char __user *u, size_t s,
|
|||
unsigned long flags;
|
||||
ssize_t ret;
|
||||
char buf[16];
|
||||
__u16 size;
|
||||
__u16 size = 0;
|
||||
|
||||
if (s == 0)
|
||||
return -EINVAL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue