* [PATCH] media: ipu3-cio2: Fix missing error code in cio2_bridge_connect_sensor()
@ 2021-10-15 10:09 Jiapeng Chong
2021-10-15 10:16 ` Daniel Scally
0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2021-10-15 10:09 UTC (permalink / raw)
To: yong.zhi
Cc: sakari.ailus, bingbu.cao, djrscally, tian.shu.qiu, mchehab,
linux-media, linux-kernel, Jiapeng Chong
The error code is missing in this code scenario, add the error code
'-EINVAL' to the return value 'ret'.
Eliminate the follow smatch warning:
drivers/media/pci/intel/ipu3/cio2-bridge.c:242 cio2_bridge_connect_sensor()
warn: missing error code 'ret'
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Fixes: 803abec64ef9 ("media: ipu3-cio2: Add cio2-bridge to ipu3-cio2 driver")
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
drivers/media/pci/intel/ipu3/cio2-bridge.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/media/pci/intel/ipu3/cio2-bridge.c b/drivers/media/pci/intel/ipu3/cio2-bridge.c
index 67c467d3..9e364ba 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 = -EINVAL;
goto err_put_adev;
+ }
if (sensor->ssdb.lanes > CIO2_MAX_LANES) {
dev_err(&adev->dev,
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] media: ipu3-cio2: Fix missing error code in cio2_bridge_connect_sensor()
2021-10-15 10:09 [PATCH] media: ipu3-cio2: Fix missing error code in cio2_bridge_connect_sensor() Jiapeng Chong
@ 2021-10-15 10:16 ` Daniel Scally
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Scally @ 2021-10-15 10:16 UTC (permalink / raw)
To: Jiapeng Chong, yong.zhi
Cc: sakari.ailus, bingbu.cao, tian.shu.qiu, mchehab, linux-media,
linux-kernel
Hi Jiapeng - thanks for the patch
On 15/10/2021 11:09, Jiapeng Chong wrote:
> The error code is missing in this code scenario, add the error code
> '-EINVAL' to the return value 'ret'.
>
> Eliminate the follow smatch warning:
>
> drivers/media/pci/intel/ipu3/cio2-bridge.c:242 cio2_bridge_connect_sensor()
> warn: missing error code 'ret'
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Fixes: 803abec64ef9 ("media: ipu3-cio2: Add cio2-bridge to ipu3-cio2 driver")
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
> drivers/media/pci/intel/ipu3/cio2-bridge.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/pci/intel/ipu3/cio2-bridge.c b/drivers/media/pci/intel/ipu3/cio2-bridge.c
> index 67c467d3..9e364ba 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 = -EINVAL;
> goto err_put_adev;
> + }
>
> if (sensor->ssdb.lanes > CIO2_MAX_LANES) {
> dev_err(&adev->dev,
This was actually just patched already:
https://lore.kernel.org/linux-media/163421191963.3878617.4945041938867839263@Monstersaurus/T/#m3dfd290de36ae21e6de90d4c297ba27bb0647611
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-15 10:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-15 10:09 [PATCH] media: ipu3-cio2: Fix missing error code in cio2_bridge_connect_sensor() Jiapeng Chong
2021-10-15 10:16 ` Daniel Scally
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).