[Intel-xe] [PATCH] drm/xe: Remove unnecessary "ret" variable
Andi Shyti
andi.shyti at linux.intel.com
Mon Nov 20 11:19:23 UTC 2023
Just a trivial removal of "ret" that doesn't have a good reason
to exist.
Signed-off-by: Andi Shyti <andi.shyti at linux.intel.com>
---
drivers/gpu/drm/xe/xe_device.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index 8be765adf702..f5c7f19033e2 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -50,16 +50,15 @@ static int xe_file_open(struct drm_device *dev, struct drm_file *file)
struct xe_device *xe = to_xe_device(dev);
struct xe_drm_client *client;
struct xe_file *xef;
- int ret = -ENOMEM;
xef = kzalloc(sizeof(*xef), GFP_KERNEL);
if (!xef)
- return ret;
+ return -ENOMEM;
client = xe_drm_client_alloc();
if (!client) {
kfree(xef);
- return ret;
+ return -ENOMEM;
}
xef->drm = file;
--
2.42.0
More information about the Intel-xe
mailing list