From 9572e6693cd731268521ab5af43858315a8cfb10 Mon Sep 17 00:00:00 2001 From: Qinglang Miao Date: Mon, 21 Sep 2020 21:11:10 +0800 Subject: vga_switcheroo: simplify the return expression of vga_switcheroo_runtime_resume Simplify the return expression. Signed-off-by: Qinglang Miao Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200921131110.93365-1-miaoqinglang@huawei.com --- drivers/gpu/vga/vga_switcheroo.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'drivers/gpu/vga') 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); } /** -- cgit v1.2.3