diff --git a/drivers/video/tegra/nvmap/nvmap_core.c b/drivers/video/tegra/nvmap/nvmap_core.c index e9decf1f..d723c6eb 100644 --- a/drivers/video/tegra/nvmap/nvmap_core.c +++ b/drivers/video/tegra/nvmap/nvmap_core.c @@ -217,7 +217,7 @@ struct sg_table *__nvmap_sg_table(struct nvmap_client *client, npages = PAGE_ALIGN(h->size) >> PAGE_SHIFT; sgt = kzalloc(sizeof(*sgt), GFP_KERNEL); - if (!sgt) { + if (sgt == NULL) { err = -ENOMEM; goto err; } diff --git a/drivers/video/tegra/nvmap/nvmap_dev.c b/drivers/video/tegra/nvmap/nvmap_dev.c index f7aec89c..e6e85ffb 100644 --- a/drivers/video/tegra/nvmap/nvmap_dev.c +++ b/drivers/video/tegra/nvmap/nvmap_dev.c @@ -298,7 +298,7 @@ static int nvmap_open(struct inode *inode, struct file *filp) BUG_ON(dev != nvmap_dev); priv = __nvmap_create_client(dev, "user"); - if (!priv) + if (priv == NULL) return -ENOMEM; trace_nvmap_open(priv, priv->name); diff --git a/drivers/video/tegra/nvmap/nvmap_dmabuf.c b/drivers/video/tegra/nvmap/nvmap_dmabuf.c index d46ea5b7..2d75353e 100644 --- a/drivers/video/tegra/nvmap/nvmap_dmabuf.c +++ b/drivers/video/tegra/nvmap/nvmap_dmabuf.c @@ -369,7 +369,7 @@ int __nvmap_map(struct nvmap_handle *h, struct vm_area_struct *vma) if (!h) return -EINVAL; - if (!(h->heap_type & nvmap_dev->cpu_access_mask)) { + if ((h->heap_type & nvmap_dev->cpu_access_mask) == 0U) { nvmap_handle_put(h); return -EPERM; } diff --git a/drivers/video/tegra/nvmap/nvmap_init.c b/drivers/video/tegra/nvmap/nvmap_init.c index d98fd530..ec35def2 100644 --- a/drivers/video/tegra/nvmap/nvmap_init.c +++ b/drivers/video/tegra/nvmap/nvmap_init.c @@ -698,7 +698,7 @@ int __init nvmap_co_setup(struct reserved_mem *rmem) int ret = 0; co = nvmap_get_carveout_pdata(rmem->name); - if (!co) + if (co == NULL) return ret; rmem->ops = &nvmap_co_ops; diff --git a/drivers/video/tegra/nvmap/nvmap_pp.c b/drivers/video/tegra/nvmap/nvmap_pp.c index 7697419e..05798b48 100644 --- a/drivers/video/tegra/nvmap/nvmap_pp.c +++ b/drivers/video/tegra/nvmap/nvmap_pp.c @@ -312,7 +312,7 @@ int nvmap_page_pool_alloc_lots(struct nvmap_page_pool *pool, while (ind < nr) { struct page *page = NULL; - if (!non_zero_cnt) + if (non_zero_cnt == 0U) page = get_page_list_page(pool, use_numa, numa_id); if (!page) {