From: Tomas Winkler Date: Thu, 10 Feb 2011 12:55:23 +0000 (+0200) Subject: staging/easycap: don't mask return value of usb_control_msg() by 0xFF X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ccb6d2e5dc37605503d0a3182dbb27981f90df94;p=linux-beck.git 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 Reported-by: Dan Carpenter Signed-off-by: Tomas Winkler Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/easycap/easycap_low.c b/drivers/staging/easycap/easycap_low.c index 7b2de10bc68a..5c41a27a683d 100644 --- a/drivers/staging/easycap/easycap_low.c +++ b/drivers/staging/easycap/easycap_low.c @@ -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)