Skip to contentSkip to conversation

drm: simplify the return expression of ast_drm_resume()

PATCH In review [email protected] 2 participants 2 messages May 5, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm: simplify the return expression of ast_drm_resume()

From: Minghao Chi <[email protected]>

Simplify the return expression.

---
 drivers/gpu/drm/ast/ast_drv.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/gpu/drm/ast/ast_drv.c +1 -6
index 7465c4f0156a..760b27971557 100644
@@ -159,15 +159,10 @@ static int ast_drm_thaw(struct drm_device *dev)
 
 static int ast_drm_resume(struct drm_device *dev)
 {
-	int ret;
-
 	if (pci_enable_device(to_pci_dev(dev->dev)))
 		return -EIO;
 
-	ret = ast_drm_thaw(dev);
-	if (ret)
-		return ret;
-	return 0;
+	return ast_drm_thaw(dev);
 }
 
 static int ast_pm_suspend(struct device *dev)
Signature · 1 line
2.25.1
#1 lore raw

Hi

Am 05.05.22 um 04:22 schrieb [email protected]:

Quoted 6 lines

From: Minghao Chi <[email protected]>

Simplify the return expression.

Thanks a lot. I added your patch to drm-misc-next.

Best regards
Thomas

Quoted 25 lines
---
  drivers/gpu/drm/ast/ast_drv.c | 7 +------
  1 file changed, 1 insertion(+), 6 deletions(-)
drivers/gpu/drm/ast/ast_drv.c +1 -6
index 7465c4f0156a..760b27971557 100644
@@ -159,15 +159,10 @@ static int ast_drm_thaw(struct drm_device *dev)
 
  static int ast_drm_resume(struct drm_device *dev)
  {
-	int ret;
-
  	if (pci_enable_device(to_pci_dev(dev->dev)))
  		return -EIO;
 
-	ret = ast_drm_thaw(dev);
-	if (ret)
-		return ret;
-	return 0;
+	return ast_drm_thaw(dev);
  }
 
  static int ast_pm_suspend(struct device *dev)
Signature · 6 lines
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev