Commit 0d5c92cd authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Mauro Carvalho Chehab
Browse files

media: i2c: vgxy61: Fix an error handling path in vgxy61_detect()



If cci_read() fails, 'st' is set to 0 in cci_read(), so we return success,
instead of the expected error code.

Fix it and return the expected error.

Fixes: 9a6d7f2b ("media: i2c: st-vgxy61: Convert to CCI register access helpers")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarBenjamin Mugnier <benjamin.mugnier@foss.st.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 40249b1d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment