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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 3 Jun 2011 10:29:33 +0100
From:	Maxin B John <maxin.john@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	akpm@...ux-foundation.org, tim.gardner@...onical.com,
	airlied@...hat.com, lethal@...ux-sh.org, james@...anarts.com,
	error27@...il.com, randy.dunlap@...cle.com
Subject: Re: [PATCH] drivers: video: Remove useless checks

ping ...

On Thu, May 19, 2011 at 7:27 PM, Maxin B John <maxin.john@...il.com> wrote:
> Comparing unsigned less than zero will never be true.
> Removing similar checks from 'fbmem.c' and 'fbcmap.c'.
>
> Please let me know your comments.
>
> Signed-off-by: Maxin B. John <maxin.john@...il.com>
> ---
> diff --git a/drivers/video/fbcmap.c b/drivers/video/fbcmap.c
> index 5c3960d..15cf8fc 100644
> --- a/drivers/video/fbcmap.c
> +++ b/drivers/video/fbcmap.c
> @@ -285,8 +285,7 @@ int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *info)
>                rc = -ENODEV;
>                goto out;
>        }
> -       if (cmap->start < 0 || (!info->fbops->fb_setcolreg &&
> -                               !info->fbops->fb_setcmap)) {
> +       if (!info->fbops->fb_setcolreg && !info->fbops->fb_setcmap) {
>                rc = -EINVAL;
>                goto out1;
>        }
> diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
> index 5aac00e..9edca4d 100644
> --- a/drivers/video/fbmem.c
> +++ b/drivers/video/fbmem.c
> @@ -1143,7 +1143,7 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd,
>                        return -EFAULT;
>                if (con2fb.console < 1 || con2fb.console > MAX_NR_CONSOLES)
>                        return -EINVAL;
> -               if (con2fb.framebuffer < 0 || con2fb.framebuffer >= FB_MAX)
> +               if (con2fb.framebuffer >= FB_MAX)
>                        return -EINVAL;
>                if (!registered_fb[con2fb.framebuffer])
>                        request_module("fb%d", con2fb.framebuffer);
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ