lkml.org 
[lkml]   [2015]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] staging: android: ion: Fixing NULL comparison style
On Thu, Nov 19, 2015 at 10:29:53PM +0530, Anjali Menon wrote:
> Using checkpatch.pl fixed the check.
>
> CHECK: Comparison to NULL could be written "!data"
>
> Signed-off-by: Anjali Menon <cse.anjalimenon@gmail.com>
> ---
> 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)

I don't think you compiled this code :(


\
 
 \ /
  Last update: 2015-11-19 18:41    [W:0.024 / U:0.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site