[staging-next 2/3] staging/easycap: don't mask return value of usb_control_msg() by 0xFF

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



masking return value of usb_control_msg() will mask negative
error values into positive.

Cc: Mike Thomas <rmthomas@xxxxxxxxxxx>
Reported-by: Dan Carpenter <error27@xxxxxxxxx>
Signed-off-by: Tomas Winkler <tomas.winkler@xxxxxxxxx>
---
 drivers/staging/easycap/easycap_low.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/easycap/easycap_low.c b/drivers/staging/easycap/easycap_low.c
index 7b2de10..5c41a27 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)
-- 
1.7.4

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux