mirror of
https://github.com/torvalds/linux.git
synced 2024-12-17 00:21:32 +00:00
staging/easycap: don't mask return value of usb_control_msg() by 0xFF
masking return value of usb_control_msg() will mask negative error values into positive. Cc: Mike Thomas <rmthomas@sciolus.org> Reported-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Reviewed-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
72075789ea
commit
ccb6d2e5dc
@ -270,7 +270,7 @@ static int regget(struct usb_device *pusb_device,
|
||||
0x00,
|
||||
index, reg, reg_size, 50000);
|
||||
|
||||
return 0xFF & rc;
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int regset(struct usb_device *pusb_device, u16 index, u16 value)
|
||||
|
Loading…
Reference in New Issue
Block a user