summaryrefslogtreecommitdiff
path: root/drivers/media/i2c/smiapp
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2016-09-07 07:37:47 -0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-10-21 15:04:28 -0200
commit1344bf74c93b87fdc5c8d4f1612470b4c3c2906f (patch)
tree93b10caac74b209db64c8cc81e9706879a560361 /drivers/media/i2c/smiapp
parent3ecb86641b20c98f01df31ee0e22d36cc28660aa (diff)
[media] smiapp: Read frame format earlier
The information gathered during frame format reading will be required earlier in the initialisation when it was available. Also return an error if frame format cannot be obtained. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/i2c/smiapp')
-rw-r--r--drivers/media/i2c/smiapp/smiapp-core.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c
index 384a13b9733b..6ec17eab70ac 100644
--- a/drivers/media/i2c/smiapp/smiapp-core.c
+++ b/drivers/media/i2c/smiapp/smiapp-core.c
@@ -2908,6 +2908,12 @@ static int smiapp_probe(struct i2c_client *client,
goto out_power_off;
}
+ rval = smiapp_read_frame_fmt(sensor);
+ if (rval) {
+ rval = -ENODEV;
+ goto out_power_off;
+ }
+
/*
* Handle Sensor Module orientation on the board.
*
@@ -3030,8 +3036,6 @@ static int smiapp_probe(struct i2c_client *client,
sensor->pixel_array->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
- /* final steps */
- smiapp_read_frame_fmt(sensor);
rval = smiapp_init_controls(sensor);
if (rval < 0)
goto out_cleanup;