From: Sachin Kamat Date: Tue, 5 Jun 2012 09:35:13 +0000 (+0530) Subject: staging: Android: Fix NULL pointer related warning in alarm-dev.c file X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=592314e9e1c0057bdb75ff00cbd1c51aa06c65e7;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git staging: Android: Fix NULL pointer related warning in alarm-dev.c file Fixes the following sparse warning: drivers/staging/android/alarm-dev.c:259:35: warning: Using plain integer as NULL pointer Cc: Brian Swetland Signed-off-by: Sachin Kamat Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/android/alarm-dev.c b/drivers/staging/android/alarm-dev.c index 32614d611283..c2d87c546e99 100644 --- a/drivers/staging/android/alarm-dev.c +++ b/drivers/staging/android/alarm-dev.c @@ -255,7 +255,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) { for (i = 0; i < ANDROID_ALARM_TYPE_COUNT; i++) { uint32_t alarm_type_mask = 1U << i; if (alarm_enabled & alarm_type_mask) {