vga_switcheroo: simplify the return expression of vga_switcheroo_runtime_resume
Subsystems (3)
PATCH 1/1 vga_switcheroo: simplify the return expression of vga_switcheroo_runtime_resume
Simplify the return expression.
Signed-off-by Qinglang Miao <[email protected]>
--- drivers/gpu/vga/vga_switcheroo.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/gpu/vga/vga_switcheroo.c +1 -6
@@ -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); }/**
Signature · 1 line
2.23.0
Daniel Vetter
AppliedQuoted 3 lines · Qinglang Miao
Simplify the return expression.
Signed-off-by Qinglang Miao <[email protected]>
Pushed to drm-misc-next, thanks for your patch.
-Daniel
Quoted 30 lines
--- drivers/gpu/vga/vga_switcheroo.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)drivers/gpu/vga/vga_switcheroo.c +1
-6@@ -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); }/** Signature · 1 line
2.23.0
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch