From: Daniel Scally <djrscally@gmail.com>
To: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>, yong.zhi@intel.com
Cc: sakari.ailus@linux.intel.com, bingbu.cao@intel.com,
tian.shu.qiu@intel.com, mchehab@kernel.org,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: ipu3-cio2: Fix missing error code in cio2_bridge_connect_sensor()
Date: Fri, 15 Oct 2021 11:16:38 +0100 [thread overview]
Message-ID: <2507e669-37c6-383b-4a80-9070ae198e4f@gmail.com> (raw)
In-Reply-To: <1634292555-66006-1-git-send-email-jiapeng.chong@linux.alibaba.com>
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
prev parent reply other threads:[~2021-10-15 10:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2507e669-37c6-383b-4a80-9070ae198e4f@gmail.com \
--to=djrscally@gmail.com \
--cc=bingbu.cao@intel.com \
--cc=jiapeng.chong@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=tian.shu.qiu@intel.com \
--cc=yong.zhi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox