@@ -588,25 +588,19 @@ static int noon010_base_config(struct v4l2_subdev *sd)
static int noon010_s_power(struct v4l2_subdev *sd, int on)
{
struct noon010_info *info = to_noon010(sd);
- const struct noon010pc30_platform_data *pdata = info->pdata;
- int ret = 0;
-
- if (WARN(pdata == NULL, "No platform data!\n"))
- return -ENOMEM;
+ int ret;
if (on) {
ret = power_enable(info);
if (ret)
return ret;
- ret = noon010_base_config(sd);
- } else {
- noon010_power_ctrl(sd, false, true);
- ret = power_disable(info);
- info->curr_win = NULL;
- info->curr_fmt = NULL;
+ return noon010_base_config(sd);
}
- return ret;
+ noon010_power_ctrl(sd, false, true);
+ info->curr_win = NULL;
+ info->curr_fmt = NULL;
+ return power_disable(info);
}
static int noon010_s_stream(struct v4l2_subdev *sd, int on)