staging: android: ion: Fixing NULL comparison style
PATCH 1/1 staging: android: ion: Fixing NULL comparison style
Using checkpatch.pl fixed the check.
CHECK: Comparison to NULL could be written "!data"
Signed-off-by Anjali Menon <[email protected]>
--- drivers/staging/android/ion/compat_ion.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/android/ion/compat_ion.c +3 -3
@@ -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);
Signature · 1 line
1.9.1
Greg KH
maintainerQuoted 14 lines · Anjali Menon
Using checkpatch.pl fixed the check.
CHECK: Comparison to NULL could be written "!data"
Signed-off-by Anjali Menon <[email protected]>--- drivers/staging/android/ion/compat_ion.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/staging/android/ion/compat_ion.c +0
-0
drivers/staging/android/ion/compat_ion.c long compat_ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) · line 140
Quoted 5 lines
drivers/staging/android/ion/compat_ion.c +1
-1@@ -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 :(