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] [thread-next>] [day] [month] [year] [list]
Message-ID: <YE1xsg0gm0nNR8hy@pendragon.ideasonboard.com>
Date:   Sun, 14 Mar 2021 04:15:14 +0200
From:   Laurent Pinchart <laurent.pinchart@...asonboard.com>
To:     angkery <angkery@....com>
Cc:     tomba@...nel.org, airlied@...ux.ie, daniel@...ll.ch,
        sebastian.reichel@...labora.com, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org, Junlin Yang <yangjunlin@...ong.com>
Subject: Re: [PATCH] drm/omap: dsi: fix unsigned expression compared with zero

Hi Junlin,

Thank you for the patch.

On Fri, Mar 12, 2021 at 03:14:45PM +0800, angkery wrote:
> From: Junlin Yang <yangjunlin@...ong.com>
> 
> r is "u32" always >= 0,mipi_dsi_create_packet may return little than zero.
> so r < 0 condition is never accessible.
> 
> Fixes coccicheck warnings:
> ./drivers/gpu/drm/omapdrm/dss/dsi.c:2155:5-6:
> WARNING: Unsigned expression compared with zero: r < 0
> 
> Signed-off-by: Junlin Yang <yangjunlin@...ong.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>

Tomi, will you take this in your tree ?

> ---
>  drivers/gpu/drm/omapdrm/dss/dsi.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
> index 8e11612..b31d750 100644
> --- a/drivers/gpu/drm/omapdrm/dss/dsi.c
> +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
> @@ -2149,11 +2149,12 @@ static int dsi_vc_send_short(struct dsi_data *dsi, int vc,
>  			     const struct mipi_dsi_msg *msg)
>  {
>  	struct mipi_dsi_packet pkt;
> +	int ret;
>  	u32 r;
>  
> -	r = mipi_dsi_create_packet(&pkt, msg);
> -	if (r < 0)
> -		return r;
> +	ret = mipi_dsi_create_packet(&pkt, msg);
> +	if (ret < 0)
> +		return ret;
>  
>  	WARN_ON(!dsi_bus_is_locked(dsi));
>  

-- 
Regards,

Laurent Pinchart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ