mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
media: stkwebcam: Bugfix for wrong return values
usb_control_msg returns in case of a successfully sent message the number of sent bytes as a positive number. Don't use this value as a return value for stk_camera_read_reg, as a non-zero return value is used as an error condition in some cases when stk_camera_read_reg is called. Signed-off-by: Andreas Pape <[email protected]> Reviewed-by: Kieran Bingham <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
parent
2bf47eefca
commit
3c28b91380
1 changed files with 5 additions and 1 deletions
|
|
@ -171,7 +171,11 @@ int stk_camera_read_reg(struct stk_camera *dev, u16 index, u8 *value)
|
|||
*value = *buf;
|
||||
|
||||
kfree(buf);
|
||||
return ret;
|
||||
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int stk_start_stream(struct stk_camera *dev)
|
||||
|
|
|
|||
Loading…
Reference in a new issue