Skip to content

Commit

Permalink
staging: Android: Fix NULL pointer related warning in alarm-dev.c file
Browse files Browse the repository at this point in the history
Fixes the following sparse warning:
drivers/staging/android/alarm-dev.c:259:35: warning: Using plain integer as NULL pointer

Cc: Brian Swetland <swetland@google.com>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Sachin Kamat authored and Greg Kroah-Hartman committed Jun 12, 2012
1 parent c810a39 commit 592314e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/android/alarm-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 592314e

Please sign in to comment.