VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   33 Branches   57 Tags
author: Qinglang Miao <miaoqinglang@huawei.com> 2020-09-21 21:11:10 +0800 committer: Daniel Vetter <daniel.vetter@ffwll.ch> 2020-09-22 15:20:29 +0200 commit: 9572e6693cd731268521ab5af43858315a8cfb10 parent: ca4bd68e11c86bbaf73cfc18dbc041350096e9ab
Commit Summary:
vga_switcheroo: simplify the return expression of vga_switcheroo_runtime_resume
Diffstat:
1 file changed, 1 insertion, 5 deletions
diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c
index 087304b1a5d7..1401fd52f37a 100644
--- a/drivers/gpu/vga/vga_switcheroo.c
+++ b/drivers/gpu/vga/vga_switcheroo.c
@@ -1034,17 +1034,12 @@ static int vga_switcheroo_runtime_suspend(struct device *dev)
 static int vga_switcheroo_runtime_resume(struct device *dev)
 {
 	struct pci_dev *pdev = to_pci_dev(dev);
-	int ret;
 
 	mutex_lock(&vgasr_mutex);
 	vga_switcheroo_power_switch(pdev, VGA_SWITCHEROO_ON);
 	mutex_unlock(&vgasr_mutex);
 	pci_wakeup_bus(pdev->bus);
-	ret = dev->bus->pm->runtime_resume(dev);
-	if (ret)
-		return ret;
-
-	return 0;
+	return dev->bus->pm->runtime_resume(dev);
 }
 
 /**