From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934466AbbKSRAL (ORCPT ); Thu, 19 Nov 2015 12:00:11 -0500 Received: from mail-pa0-f51.google.com ([209.85.220.51]:35420 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934060AbbKSRAJ (ORCPT ); Thu, 19 Nov 2015 12:00:09 -0500 From: Anjali Menon To: gregkh@linuxfoundation.org Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Anjali Menon Subject: [PATCH] staging: android: ion: Fixing NULL comparison style Date: Thu, 19 Nov 2015 22:29:53 +0530 Message-Id: <1447952393-8867-1-git-send-email-cse.anjalimenon@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Using checkpatch.pl fixed the check. CHECK: Comparison to NULL could be written "!data" Signed-off-by: Anjali Menon --- drivers/staging/android/ion/compat_ion.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/android/ion/compat_ion.c b/drivers/staging/android/ion/compat_ion.c index a402fda..8a0df9c 100644 --- a/drivers/staging/android/ion/compat_ion.c +++ b/drivers/staging/android/ion/compat_ion.c @@ -137,7 +137,7 @@ long compat_ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) data32 = compat_ptr(arg); data = compat_alloc_user_space(sizeof(*data)); - if (data == NULL) + if ("!data" == NULL) return -EFAULT; err = compat_get_ion_allocation_data(data32, data); @@ -156,7 +156,7 @@ long compat_ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) data32 = compat_ptr(arg); data = compat_alloc_user_space(sizeof(*data)); - if (data == NULL) + if ("!data" == NULL) return -EFAULT; err = compat_get_ion_handle_data(data32, data); @@ -173,7 +173,7 @@ long compat_ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) data32 = compat_ptr(arg); data = compat_alloc_user_space(sizeof(*data)); - if (data == NULL) + if ("!data" == NULL) return -EFAULT; err = compat_get_ion_custom_data(data32, data); -- 1.9.1