[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210605122415.8621-1-bernard@vivo.com>
Date: Sat, 5 Jun 2021 05:24:14 -0700
From: Bernard Zhao <bernard@...o.com>
To: Lucas Stach <l.stach@...gutronix.de>,
Russell King <linux+etnaviv@...linux.org.uk>,
Christian Gmeiner <christian.gmeiner@...il.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>, etnaviv@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Cc: Bernard Zhao <bernard@...o.com>
Subject: [PATCH] drm/etnaviv: remove no need NULL check
NULL check before kvfree functions is not needed.
Signed-off-by: Bernard Zhao <bernard@...o.com>
---
drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c b/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
index d05c35994579..bd0d66ebf314 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
@@ -612,14 +612,10 @@ int etnaviv_ioctl_gem_submit(struct drm_device *dev, void *data,
err_submit_cmds:
if (ret && (out_fence_fd >= 0))
put_unused_fd(out_fence_fd);
- if (stream)
- kvfree(stream);
- if (bos)
- kvfree(bos);
- if (relocs)
- kvfree(relocs);
- if (pmrs)
- kvfree(pmrs);
+ kvfree(stream);
+ kvfree(bos);
+ kvfree(relocs);
+ kvfree(pmrs);
return ret;
}
--
2.31.0
Powered by blists - more mailing lists