Commit 85db29d2 authored by Dan Carpenter's avatar Dan Carpenter Committed by Mauro Carvalho Chehab

media: ipu3-cio2: fix error code in cio2_bridge_connect_sensor()

Return -ENODEV if acpi_get_physical_device_location() fails.  Don't
return success.

Fixes: 485aa3df ("media: ipu3-cio2: Parse sensor orientation and rotation")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarDaniel Scally <djrscally@gmail.com>
Reviewed-by: default avatarKieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 9b005ce9
......@@ -238,8 +238,10 @@ static int cio2_bridge_connect_sensor(const struct cio2_sensor_config *cfg,
goto err_put_adev;
status = acpi_get_physical_device_location(adev->handle, &sensor->pld);
if (ACPI_FAILURE(status))
if (ACPI_FAILURE(status)) {
ret = -ENODEV;
goto err_put_adev;
}
if (sensor->ssdb.lanes > CIO2_MAX_LANES) {
dev_err(&adev->dev,
......
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