lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240508151124.GB19625@pendragon.ideasonboard.com>
Date: Wed, 8 May 2024 18:11:24 +0300
From: Laurent Pinchart <laurent.pinchart@...asonboard.com>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: Dave Stevenson <dave.stevenson@...pberrypi.com>,
	Mauro Carvalho Chehab <mchehab@...nel.org>,
	Florian Fainelli <florian.fainelli@...adcom.com>,
	Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>,
	Ray Jui <rjui@...adcom.com>, Scott Branden <sbranden@...adcom.com>,
	Sakari Ailus <sakari.ailus@...ux.intel.com>,
	Ricardo Ribalda <ribalda@...omium.org>,
	Hans Verkuil <hverkuil-cisco@...all.nl>,
	Jean-Michel Hautbois <jeanmichel.hautbois@...asonboard.com>,
	linux-media@...r.kernel.org, linux-rpi-kernel@...ts.infradead.org,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] media: bcm2835-unicam: Fix a NULL vs IS_ERR() check

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@...aro.org>

Reviewed-by: Laurent Pinchart <laurent.pinchart@...asonboard.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ