Skip to content

Commit

Permalink
staging/easycap: don't mask return value of usb_control_msg() by 0xFF
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tomas Winkler authored and Greg Kroah-Hartman committed Feb 18, 2011
1 parent 7207578 commit ccb6d2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/easycap/easycap_low.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ccb6d2e

Please sign in to comment.