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:	Mon, 31 May 2010 12:10:29 -0700
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Dan Carpenter <error27@...il.com>,
	Todd Fischer <todd.fischer@...gerun.com>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: Re: [patch 2/2] input/tps6507x-ts: zero vs NULL

On Mon, May 31, 2010 at 02:02:15PM +0200, Dan Carpenter wrote:
> This patch silences a sparse warning:
> 
> drivers/input/touchscreen/tps6507x-ts.c:345:19:
> 	warning: Using plain integer as NULL pointer
> drivers/input/touchscreen/tps6507x-ts.c:367:19:
> 	warning: Using plain integer as NULL pointer
> 
> Signed-off-by: Dan Carpenter <error27@...il.com>
> 
> diff --git a/drivers/input/touchscreen/tps6507x-ts.c b/drivers/input/touchscreen/tps6507x-ts.c
> index b99db09..1e57e4e 100644
> --- a/drivers/input/touchscreen/tps6507x-ts.c
> +++ b/drivers/input/touchscreen/tps6507x-ts.c
> @@ -342,7 +342,7 @@ err2:
>  	cancel_delayed_work(&tsc->work);
>  	flush_workqueue(tsc->wq);
>  	destroy_workqueue(tsc->wq);
> -	tsc->wq = 0;
> +	tsc->wq = NULL;
>  	input_free_device(input_dev);
>  err1:
>  	kfree(tsc);
> @@ -364,7 +364,7 @@ static int __devexit tps6507x_ts_remove(struct platform_device *pdev)
>  	cancel_delayed_work(&tsc->work);
>  	flush_workqueue(tsc->wq);

Why isn't it cancel_delayed_work_sync()?

>  	destroy_workqueue(tsc->wq);
> -	tsc->wq = 0;
> +	tsc->wq = NULL;
>  

Setting tsc to 0/NULL does not make much sense as it is being freed a
couple of lines below.

>  	input_free_device(input_dev);
>  

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