On Tue, Jun 05, 2012 at 01:56:44PM +0530, Sachin Kamat wrote: > Fixes the following sparse warning: > drivers/staging/android/alarm-dev.c:259:35: warning: Using plain integer as NULL pointer > > Cc: Brian Swetland <swetland@xxxxxxxxxx> > Signed-off-by: Sachin Kamat <sachin.kamat@xxxxxxxxxx> > --- > drivers/staging/android/alarm-dev.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/staging/android/alarm-dev.c b/drivers/staging/android/alarm-dev.c > index 53ce6ec..18d9b3f 100644 > --- a/drivers/staging/android/alarm-dev.c > +++ b/drivers/staging/android/alarm-dev.c > @@ -256,7 +256,7 @@ static int alarm_release(struct inode *inode, struct file *file) > unsigned long flags; > > spin_lock_irqsave(&alarm_slock, flags); > - if (file->private_data != 0) { > + if (file->private_data != NULL) { Better to just say: if (file->private_data) { The double negative of "if private_data is not NULL" is less readable. regards, dan carpenter _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel