The variable ret is being checked for failure however it is not being set
from the return status from the call to imx274_mode_regs. Currently ret is
alwayus zero and the check is redundant. Fix this by assigning it.
Detected by CoverityScan, CID#
1460278 ("Logically dead code")
Fixes: 0985dd306f72 ("media: imx274: V4l2 driver for Sony imx274 CMOS sensor")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
if (on) {
/* load mode registers */
- imx274_mode_regs(imx274, imx274->mode_index);
+ ret = imx274_mode_regs(imx274, imx274->mode_index);
if (ret)
goto fail;