diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2021-10-13 09:53:19 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-11-15 09:11:34 +0100 |
commit | 85db29d22cc521d9d06de2f5c7832981a55df157 (patch) | |
tree | 6ae2641780d95ead6d42dd29a0dd62ee9afd756b /drivers/media/pci | |
parent | media: staging: ipu3-imgu: clarify the limitation of grid config (diff) | |
download | linux-85db29d22cc521d9d06de2f5c7832981a55df157.tar.xz linux-85db29d22cc521d9d06de2f5c7832981a55df157.zip |
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: 485aa3df0dff ("media: ipu3-cio2: Parse sensor orientation and rotation")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Daniel Scally <djrscally@gmail.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/pci')
-rw-r--r-- | drivers/media/pci/intel/ipu3/cio2-bridge.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/pci/intel/ipu3/cio2-bridge.c b/drivers/media/pci/intel/ipu3/cio2-bridge.c index 67c467d3c81f..0b586b4e537e 100644 --- a/drivers/media/pci/intel/ipu3/cio2-bridge.c +++ b/drivers/media/pci/intel/ipu3/cio2-bridge.c @@ -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, |