Commit 2c61e48d authored by Lad Prabhakar's avatar Lad Prabhakar Committed by Mauro Carvalho Chehab

media: i2c: ov5640: Fail probe on unsupported bus_type

Fail probe if unsupported bus_type is detected.
Signed-off-by: default avatarLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: default avatarJacopo Mondi <jacopo@jmondi.org>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 4039b037
...@@ -3072,6 +3072,13 @@ static int ov5640_probe(struct i2c_client *client) ...@@ -3072,6 +3072,13 @@ static int ov5640_probe(struct i2c_client *client)
return ret; return ret;
} }
if (sensor->ep.bus_type != V4L2_MBUS_PARALLEL &&
sensor->ep.bus_type != V4L2_MBUS_CSI2_DPHY &&
sensor->ep.bus_type != V4L2_MBUS_BT656) {
dev_err(dev, "Unsupported bus type %d\n", sensor->ep.bus_type);
return -EINVAL;
}
/* get system clock (xclk) */ /* get system clock (xclk) */
sensor->xclk = devm_clk_get(dev, "xclk"); sensor->xclk = devm_clk_get(dev, "xclk");
if (IS_ERR(sensor->xclk)) { if (IS_ERR(sensor->xclk)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment