[PATCH 1/4] drm/exynos: Remove redundant NULL check in exynos_drm_buf
Sachin Kamat
sachin.kamat at linaro.org
Wed Aug 14 04:08:00 PDT 2013
kfree handles null pointers. Hence this check is not necessary.
Signed-off-by: Sachin Kamat <sachin.kamat at linaro.org>
---
drivers/gpu/drm/exynos/exynos_drm_buf.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_buf.c b/drivers/gpu/drm/exynos/exynos_drm_buf.c
index b8ac06d..7f489e7 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_buf.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_buf.c
@@ -161,11 +161,6 @@ struct exynos_drm_gem_buf *exynos_drm_init_buf(struct drm_device *dev,
void exynos_drm_fini_buf(struct drm_device *dev,
struct exynos_drm_gem_buf *buffer)
{
- if (!buffer) {
- DRM_DEBUG_KMS("buffer is null.\n");
- return;
- }
-
kfree(buffer);
buffer = NULL;
}
--
1.7.9.5
More information about the dri-devel
mailing list