data32 = compat_ptr(arg);
                data = compat_alloc_user_space(sizeof(*data));
-               if (data == NULL)
+               if (!data)
                        return -EFAULT;
 
                err = compat_get_ion_allocation_data(data32, data);
 
                data32 = compat_ptr(arg);
                data = compat_alloc_user_space(sizeof(*data));
-               if (data == NULL)
+               if (!data)
                        return -EFAULT;
 
                err = compat_get_ion_handle_data(data32, data);
 
                data32 = compat_ptr(arg);
                data = compat_alloc_user_space(sizeof(*data));
-               if (data == NULL)
+               if (!data)
                        return -EFAULT;
 
                err = compat_get_ion_custom_data(data32, data);
 
                return NULL;
 
        obj = kzalloc(size, GFP_KERNEL);
-       if (obj == NULL)
+       if (!obj)
                return NULL;
 
        kref_init(&obj->kref);
                return NULL;
 
        pt = kzalloc(size, GFP_KERNEL);
-       if (pt == NULL)
+       if (!pt)
                return NULL;
 
        spin_lock_irqsave(&obj->child_list_lock, flags);
        struct sync_fence *fence;
 
        fence = kzalloc(size, GFP_KERNEL);
-       if (fence == NULL)
+       if (!fence)
                return NULL;
 
        fence->file = anon_inode_getfile("sync_fence", &sync_fence_fops,
        struct sync_fence *fence;
 
        fence = sync_fence_alloc(offsetof(struct sync_fence, cbs[1]), name);
-       if (fence == NULL)
+       if (!fence)
                return NULL;
 
        fence->num_fences = 1;
 {
        struct file *file = fget(fd);
 
-       if (file == NULL)
+       if (!file)
                return NULL;
 
        if (file->f_op != &sync_fence_fops)
        unsigned long size = offsetof(struct sync_fence, cbs[num_fences]);
 
        fence = sync_fence_alloc(size, name);
-       if (fence == NULL)
+       if (!fence)
                return NULL;
 
        atomic_set(&fence->status, num_fences);
        }
 
        fence2 = sync_fence_fdget(data.fd2);
-       if (fence2 == NULL) {
+       if (!fence2) {
                err = -ENOENT;
                goto err_put_fd;
        }
 
        data.name[sizeof(data.name) - 1] = '\0';
        fence3 = sync_fence_merge(data.name, fence, fence2);
-       if (fence3 == NULL) {
+       if (!fence3) {
                err = -ENOMEM;
                goto err_put_fence2;
        }
                size = 4096;
 
        data = kzalloc(size, GFP_KERNEL);
-       if (data == NULL)
+       if (!data)
                return -ENOMEM;
 
        strlcpy(data->name, fence->name, sizeof(data->name));