From patchwork Tue Jun 5 09:35:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 9113 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 77AD123E37 for ; Tue, 5 Jun 2012 09:46:21 +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 441DBA18EEB for ; Tue, 5 Jun 2012 09:46:21 +0000 (UTC) Received: by yenq6 with SMTP id q6so4253236yen.11 for ; Tue, 05 Jun 2012 02:46:20 -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:x-gm-message-state; bh=LpbtqJaOaN+RHy9mrY4jQcmbZhMoFD2/tv6KiEv/nzU=; b=L4+p9awC7Pf+zFeSjUE7YZ0TnbqgGS7zvJRN52ulRsjMET2zJNEF/rRGVpTAyRp69v xQGiuSQZwvn3Z416VkQSNgBZUW3eDCSAcleFvO78RzKENJBvwtqNzleKQ51or4dXWKSV e2MpWuSHMFnXC874Vxm69MwU5NC2v9VVloXOlvT7Q/wEas//j4iqrZ6PbRaAI9wxMcZX /IIoq7OZZ+Vi3rUzTLPY+uJps4ZL18JrhbKRFD84dt0dlsa9T3dRO5h1P5lZLyQrMxyZ FwvVRrIJ6p7nGm3uHJUbB6bhHtUc+2nxTGF7ExmxxFejsWW9byPRjCO2U+/YcKphGk3A iZsA== Received: by 10.50.193.196 with SMTP id hq4mr1593797igc.57.1338889580415; Tue, 05 Jun 2012 02:46:20 -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 v20csp15290ibb; Tue, 5 Jun 2012 02:46:19 -0700 (PDT) Received: by 10.68.222.163 with SMTP id qn3mr47900879pbc.135.1338889579700; Tue, 05 Jun 2012 02:46:19 -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 vr5si1698279pbc.43.2012.06.05.02.46.19 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 05 Jun 2012 02:46:19 -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 pbbrr4 with SMTP id rr4so8480848pbb.37 for ; Tue, 05 Jun 2012 02:46:19 -0700 (PDT) Received: by 10.68.193.195 with SMTP id hq3mr30255975pbc.30.1338889579197; Tue, 05 Jun 2012 02:46:19 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id rd7sm1820528pbc.70.2012.06.05.02.46.15 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 05 Jun 2012 02:46:18 -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-Resend 2/2] staging: Android: Fix NULL pointer related warning in alarm-dev.c file Date: Tue, 5 Jun 2012 15:05:13 +0530 Message-Id: <1338888913-13855-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQnGIqRBRjIGZtEOoa4PDeoUTY/9lyDoW2xNj42CjQCHFhRE64p5Z0dtUvMFl0vyETYFNMmw 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) { for (i = 0; i < ANDROID_ALARM_TYPE_COUNT; i++) { uint32_t alarm_type_mask = 1U << i; if (alarm_enabled & alarm_type_mask) {