staging/easycap: don't mask return value of usb_control_msg() by 0xFF
authorTomas Winkler <tomas.winkler@intel.com>
Thu, 10 Feb 2011 12:55:23 +0000 (14:55 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 18 Feb 2011 20:40:00 +0000 (12:40 -0800)
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>
drivers/staging/easycap/easycap_low.c

index 7b2de10bc68a28b20f9d81e583b9b92db85fa5f7..5c41a27a683d01aa1bd794af0d397f274737b97f 100644 (file)
@@ -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)