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]
Date:	Tue, 25 Jan 2011 16:23:11 -0500
From:	Devin Heitmueller <dheitmueller@...ppauge.com>
To:	Peter Huewe <peterhuewe@....de>
CC:	Mauro Carvalho Chehab <mchehab@...radead.org>,
	Sri Deevi <Srinivasa.Deevi@...exant.com>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] video/cx231xx:  Fix sparse warning: Using plain integer as NULL pointer

On 01/25/2011 03:38 PM, Peter Huewe wrote:
>
> This patch fixes the warning "Using plain integer as NULL pointer",
> generated by sparse, by replacing the offending 0s with NULL.
>
> KernelVersion: linus' tree-c723fdab
>
> Signed-off-by: Peter Huewe <peterhuewe@....de>
> ---
>  drivers/media/video/cx231xx/cx231xx-417.c   |    4 ++--
>  drivers/media/video/cx231xx/cx231xx-cards.c |   16 ++++++++--------
>  2 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/media/video/cx231xx/cx231xx-417.c 
> b/drivers/media/video/cx231xx/cx231xx-417.c
> index fc9526a..f8f0e59 100644
> --- a/drivers/media/video/cx231xx/cx231xx-417.c
> +++ b/drivers/media/video/cx231xx/cx231xx-417.c
> @@ -942,13 +942,13 @@ static int cx231xx_load_firmware(struct cx231xx 
> *dev)
>
>         p_current_fw = vmalloc(1884180 * 4);
>         p_fw = p_current_fw;
> -       if (p_current_fw == 0) {
> +       if (p_current_fw == NULL) {
>                 dprintk(2, "FAIL!!!\n");
>                 return -1;
>         }
>
>         p_buffer = vmalloc(4096);
> -       if (p_buffer == 0) {
> +       if (p_buffer == NULL) {
>                 dprintk(2, "FAIL!!!\n");
>                 return -1;
>         }
> diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c 
> b/drivers/media/video/cx231xx/cx231xx-cards.c
> index 588f3e8..5b9b5f4 100644
> --- a/drivers/media/video/cx231xx/cx231xx-cards.c
> +++ b/drivers/media/video/cx231xx/cx231xx-cards.c
> @@ -357,19 +357,19 @@ struct cx231xx_board cx231xx_boards[] = {
>                         .type = CX231XX_VMUX_TELEVISION,
>                         .vmux = CX231XX_VIN_3_1,
>                         .amux = CX231XX_AMUX_VIDEO,
> -                       .gpio = 0,
> +                       .gpio = NULL,
>                 }, {
>                         .type = CX231XX_VMUX_COMPOSITE1,
>                         .vmux = CX231XX_VIN_2_1,
>                         .amux = CX231XX_AMUX_LINE_IN,
> -                       .gpio = 0,
> +                       .gpio = NULL,
>                 }, {
>                         .type = CX231XX_VMUX_SVIDEO,
>                         .vmux = CX231XX_VIN_1_1 |
>                                 (CX231XX_VIN_1_2 << 8) |
>                                 CX25840_SVIDEO_ON,
>                         .amux = CX231XX_AMUX_LINE_IN,
> -                       .gpio = 0,
> +                       .gpio = NULL,
>                 } },
>         },
>         [CX231XX_BOARD_HAUPPAUGE_USBLIVE2] = {
> @@ -386,14 +386,14 @@ struct cx231xx_board cx231xx_boards[] = {
>                         .type = CX231XX_VMUX_COMPOSITE1,
>                         .vmux = CX231XX_VIN_2_1,
>                         .amux = CX231XX_AMUX_LINE_IN,
> -                       .gpio = 0,
> +                       .gpio = NULL,
>                 }, {
>                         .type = CX231XX_VMUX_SVIDEO,
>                         .vmux = CX231XX_VIN_1_1 |
>                                 (CX231XX_VIN_1_2 << 8) |
>                                 CX25840_SVIDEO_ON,
>                         .amux = CX231XX_AMUX_LINE_IN,
> -                       .gpio = 0,
> +                       .gpio = NULL,
>                 } },
>         },
>         [CX231XX_BOARD_PV_PLAYTV_USB_HYBRID] = {
> @@ -420,19 +420,19 @@ struct cx231xx_board cx231xx_boards[] = {
>                         .type = CX231XX_VMUX_TELEVISION,
>                         .vmux = CX231XX_VIN_3_1,
>                         .amux = CX231XX_AMUX_VIDEO,
> -                       .gpio = 0,
> +                       .gpio = NULL,
>                 }, {
>                         .type = CX231XX_VMUX_COMPOSITE1,
>                         .vmux = CX231XX_VIN_2_1,
>                         .amux = CX231XX_AMUX_LINE_IN,
> -                       .gpio = 0,
> +                       .gpio = NULL,
>                 }, {
>                         .type = CX231XX_VMUX_SVIDEO,
>                         .vmux = CX231XX_VIN_1_1 |
>                                 (CX231XX_VIN_1_2 << 8) |
>                                 CX25840_SVIDEO_ON,
>                         .amux = CX231XX_AMUX_LINE_IN,
> -                       .gpio = 0,
> +                       .gpio = NULL,
>                 } },
>         },
>  };
> -- 
> 1.7.2.2
>
Reviewed-by: Devin Heitmueller <dheitmueller@...ppauge.com>

-- 
Devin Heitmueller
Senior Software Engineer
Hauppauge Computer Works

--
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