]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/tegra: Remove redundant null checks before kfree
authorYushan Zhou <katrinzhou@tencent.com>
Tue, 29 Nov 2022 09:45:46 +0000 (17:45 +0800)
committerThierry Reding <treding@nvidia.com>
Thu, 26 Jan 2023 14:55:39 +0000 (15:55 +0100)
Fix the following coccicheck warning:
./drivers/gpu/drm/tegra/submit.c:689:2-7: WARNING:
NULL check before some freeing functions is not needed.

Signed-off-by: Yushan Zhou <katrinzhou@tencent.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/submit.c

index f4688fcafe9339dc35907cf88f3b499011662f59..d775225bed1276ff04280c4b0584e813716920ef 100644 (file)
@@ -680,8 +680,7 @@ free_job_data:
                kfree(job_data->used_mappings);
        }
 
-       if (job_data)
-               kfree(job_data);
+       kfree(job_data);
 put_bo:
        gather_bo_put(&bo->base);
 unlock: