Skip to contentSkip to conversation

drm/amdgpu: remove set but not used variables

PATCH New Tian Tao 1 participant 1 message Apr 13, 2021

Subsystems (2)
lore
Share & tools
lore

Tian Tao

author
#0 lore raw

PATCH 1/1 drm/amdgpu: remove set but not used variables

The value of ret set but will rewriten, so just delete.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +3 -5
index 1fb2a91..f303ad6 100644
@@ -1815,10 +1815,8 @@ int amdgpu_ras_recovery_init(struct amdgpu_device *adev)
 		return 0;
 
 	*data = kmalloc(sizeof(**data), GFP_KERNEL | __GFP_ZERO);
-	if (!*data) {
-		ret = -ENOMEM;
-		goto out;
-	}
+	if (!*data)
+		return -ENOMEM;
 
 	mutex_init(&con->recovery_lock);
 	INIT_WORK(&con->recovery_work, amdgpu_ras_do_recovery);
@@ -1848,7 +1846,7 @@ int amdgpu_ras_recovery_init(struct amdgpu_device *adev)
 	kfree((*data)->bps);
 	kfree(*data);
 	con->eh_data = NULL;
-out:
+
 	dev_warn(adev->dev, "Failed to initialize ras recovery!\n");
 
 	/*
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel