media: ov7740: fix unbalanced pm_runtime_get/put

Avoid returning without decrement the usage count in s_ctrl().

Cc: Wenyou Yang <wenyou.yang@microchip.com>
Cc: Eugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
Akinobu Mita 2019-04-17 10:06:38 -04:00 коммит произвёл Mauro Carvalho Chehab
Родитель 428d3c867d
Коммит cfe7cc383c
1 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -561,16 +561,16 @@ static int ov7740_set_ctrl(struct v4l2_ctrl *ctrl)
break;
case V4L2_CID_AUTOGAIN:
if (!ctrl->val)
return ov7740_set_gain(regmap, ov7740->gain->val);
ret = ov7740_set_autogain(regmap, ctrl->val);
ret = ov7740_set_gain(regmap, ov7740->gain->val);
else
ret = ov7740_set_autogain(regmap, ctrl->val);
break;
case V4L2_CID_EXPOSURE_AUTO:
if (ctrl->val == V4L2_EXPOSURE_MANUAL)
return ov7740_set_exp(regmap, ov7740->exposure->val);
ret = ov7740_set_autoexp(regmap, ctrl->val);
ret = ov7740_set_exp(regmap, ov7740->exposure->val);
else
ret = ov7740_set_autoexp(regmap, ctrl->val);
break;
default:
ret = -EINVAL;