Skip to content

Commit

Permalink
vga_switcheroo: simplify the return expression of vga_switcheroo_runt…
Browse files Browse the repository at this point in the history
…ime_resume

Simplify the return expression.

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200921131110.93365-1-miaoqinglang@huawei.com
  • Loading branch information
Qinglang Miao authored and Daniel Vetter committed Sep 22, 2020
1 parent ca4bd68 commit 9572e66
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions drivers/gpu/vga/vga_switcheroo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 9572e66

Please sign in to comment.