From patchwork Tue Jun 5 08:26:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 9112 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 3A42E23E56 for ; Tue, 5 Jun 2012 08:38:06 +0000 (UTC) Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.213.180]) by fiordland.canonical.com (Postfix) with ESMTP id 0ABDDA1899E for ; Tue, 5 Jun 2012 08:38:05 +0000 (UTC) Received: by mail-yx0-f180.google.com with SMTP id q6so4217242yen.11 for ; Tue, 05 Jun 2012 01:38:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=iuIO/CFkbw7B8KnO0AyO26vOuRXR8dwKPpLS22uIfrc=; b=gIF3wTW6YwUokJkmG3PRk/EnHG08OByTdCKrMAxqPAIHwGkgoVyZ4qzIkTN92YTy6W cDWuxsKs6j7kkvyRXdCva50bXDZwKfUtyrHLtjxbw3PPUkS91n16neZNtlKV3ShkRZIL pqTlRaXi82lkB0XoXFarjmcReQE6ae5qLXYCRImMYoW2FTA76TcUc1tOM7ghOVejUviL fhxVKaVqZ8V/l9zqEtgdYGjzvwXfjTujNG5S4ooIzEANp4uoppfBsrPEmZVdcetVrdnG 2YlCktMXTvLnrGLUO3a8WQNhEUi0iefmQh2K/hyMFgD/1ZCWdEV+6gvVoCvR7/1gi+QK DR1g== Received: by 10.42.155.73 with SMTP id t9mr9541888icw.48.1338885485662; Tue, 05 Jun 2012 01:38:05 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.24.148 with SMTP id v20csp12331ibb; Tue, 5 Jun 2012 01:38:04 -0700 (PDT) Received: by 10.68.132.166 with SMTP id ov6mr48765266pbb.24.1338885484743; Tue, 05 Jun 2012 01:38:04 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id hc10si1538921pbc.31.2012.06.05.01.38.04 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 05 Jun 2012 01:38:04 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pb0-f50.google.com with SMTP id rr4so8405935pbb.37 for ; Tue, 05 Jun 2012 01:38:04 -0700 (PDT) Received: by 10.68.225.6 with SMTP id rg6mr47575711pbc.100.1338885484432; Tue, 05 Jun 2012 01:38:04 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id qp3sm1663091pbc.17.2012.06.05.01.38.01 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 05 Jun 2012 01:38:03 -0700 (PDT) From: Sachin Kamat To: devel@driverdev.osuosl.org Cc: gregkh@linuxfoundation.org, john.stultz@linaro.org, swetland@google.com, arve@android.com, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 2/2] staging: Android: Fix NULL pointer related warning in alarm-dev.c file Date: Tue, 5 Jun 2012 13:56:44 +0530 Message-Id: <1338884804-7427-2-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1338884804-7427-1-git-send-email-sachin.kamat@linaro.org> References: <1338884804-7427-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQm5S09MlasYx0qWk6pezt5R6gaLP36p2AhFTW864nG8co+uXJCAt+wbICsddZd+0gmo8Sdb 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 --- 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) { for (i = 0; i < ANDROID_ALARM_TYPE_COUNT; i++) { uint32_t alarm_type_mask = 1U << i; if (alarm_enabled & alarm_type_mask) {