From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Dave Stevenson <dave.stevenson@raspberrypi.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
Ray Jui <rjui@broadcom.com>,
Scott Branden <sbranden@broadcom.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Ricardo Ribalda <ribalda@chromium.org>,
Hans Verkuil <hverkuil-cisco@xs4all.nl>,
Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>,
linux-media@vger.kernel.org,
linux-rpi-kernel@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] media: bcm2835-unicam: Fix a NULL vs IS_ERR() check
Date: Wed, 8 May 2024 18:11:24 +0300 [thread overview]
Message-ID: <20240508151124.GB19625@pendragon.ideasonboard.com> (raw)
In-Reply-To: <fbbe7862-2820-44eb-81cb-7f33b99cca35@moroto.mountain>
Hi Dan,
Thank you for the patch.
On Wed, May 08, 2024 at 03:31:00PM +0300, Dan Carpenter wrote:
> The media_pad_remote_pad_unique() function returns error pointers, not
> NULL. Update the check accordingly.
>
> Fixes: 392cd78d495f ("media: bcm2835-unicam: Add support for CCP2/CSI2 camera interface")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/media/platform/broadcom/bcm2835-unicam.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/platform/broadcom/bcm2835-unicam.c b/drivers/media/platform/broadcom/bcm2835-unicam.c
> index 3c7878d8d79b..ad55fc930e5b 100644
> --- a/drivers/media/platform/broadcom/bcm2835-unicam.c
> +++ b/drivers/media/platform/broadcom/bcm2835-unicam.c
> @@ -2433,9 +2433,9 @@ static int unicam_async_bound(struct v4l2_async_notifier *notifier,
> return ret;
>
> source = media_pad_remote_pad_unique(sink);
> - if (!source) {
> + if (IS_ERR(source)) {
> dev_err(unicam->dev, "No connected sensor pad\n");
> - return -ENOTCONN;
> + return PTR_ERR(source);
> }
>
> unicam->sensor.subdev = subdev;
--
Regards,
Laurent Pinchart
prev parent reply other threads:[~2024-05-08 15:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-08 12:31 [PATCH] media: bcm2835-unicam: Fix a NULL vs IS_ERR() check Dan Carpenter
2024-05-08 15:11 ` Laurent Pinchart [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=20240508151124.GB19625@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=dan.carpenter@linaro.org \
--cc=dave.stevenson@raspberrypi.com \
--cc=florian.fainelli@broadcom.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=jeanmichel.hautbois@ideasonboard.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=mchehab@kernel.org \
--cc=ribalda@chromium.org \
--cc=rjui@broadcom.com \
--cc=sakari.ailus@linux.intel.com \
--cc=sbranden@broadcom.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).