[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220602071909.278279-1-chi.minghao@zte.com.cn>
Date: Thu, 2 Jun 2022 07:19:09 +0000
From: cgel.zte@...il.com
To: thierry.reding@...il.com
Cc: airlied@...ux.ie, dri-devel@...ts.freedesktop.org,
linux-tegra@...r.kernel.org, linux-kernel@...r.kernel.org,
Minghao Chi <chi.minghao@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: [PATCH] drm/tegra: Remove redundant NULL check before kfree
From: Minghao Chi <chi.minghao@....com.cn>
kfree on NULL pointer is a no-op.
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: Minghao Chi <chi.minghao@....com.cn>
---
drivers/gpu/drm/tegra/submit.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/tegra/submit.c b/drivers/gpu/drm/tegra/submit.c
index 6d6dd8c35475..54ac31bc80f6 100644
--- a/drivers/gpu/drm/tegra/submit.c
+++ b/drivers/gpu/drm/tegra/submit.c
@@ -639,8 +639,7 @@ int tegra_drm_ioctl_channel_submit(struct drm_device *drm, void *data,
kfree(job_data->used_mappings);
}
- if (job_data)
- kfree(job_data);
+ kfree(job_data);
put_bo:
gather_bo_put(&bo->base);
unlock:
--
2.25.1
Powered by blists - more mailing lists