Commit ccb6d2e5 authored by Tomas Winkler's avatar Tomas Winkler Committed by Greg Kroah-Hartman

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: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Reviewed-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 72075789
...@@ -270,7 +270,7 @@ static int regget(struct usb_device *pusb_device, ...@@ -270,7 +270,7 @@ static int regget(struct usb_device *pusb_device,
0x00, 0x00,
index, reg, reg_size, 50000); index, reg, reg_size, 50000);
return 0xFF & rc; return rc;
} }
static int regset(struct usb_device *pusb_device, u16 index, u16 value) static int regset(struct usb_device *pusb_device, u16 index, u16 value)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment