提交 592314e9 编写于 作者: S Sachin Kamat 提交者: Greg Kroah-Hartman

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 <swetland@google.com>
Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 c810a399
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册