提交 ccb6d2e5 编写于 作者: T Tomas Winkler 提交者: 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: NDan Carpenter <error27@gmail.com>
Signed-off-by: NTomas Winkler <tomas.winkler@intel.com>
Reviewed-by: NDan Carpenter <error27@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 72075789
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册