diff options
author | Yushan Zhou <katrinzhou@tencent.com> | 2022-11-29 17:45:46 +0800 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2023-01-26 15:55:39 +0100 |
commit | 584f13e75356936736930c501bce2db3616fb70e (patch) | |
tree | dd0d21f64b3c52a6abefd5d0721e745a2f15d8a6 /drivers/gpu/drm/tegra | |
parent | d5179020f5ce44fd449790a9c12ef6c1a90a2ca7 (diff) | |
download | linux-stable-584f13e75356936736930c501bce2db3616fb70e.tar.gz linux-stable-584f13e75356936736930c501bce2db3616fb70e.tar.bz2 linux-stable-584f13e75356936736930c501bce2db3616fb70e.zip |
drm/tegra: Remove redundant null checks before kfree
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>
Diffstat (limited to 'drivers/gpu/drm/tegra')
-rw-r--r-- | drivers/gpu/drm/tegra/submit.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/tegra/submit.c b/drivers/gpu/drm/tegra/submit.c index f4688fcafe93..d775225bed12 100644 --- a/drivers/gpu/drm/tegra/submit.c +++ b/drivers/gpu/drm/tegra/submit.c @@ -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: |