mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
vga_switcheroo: simplify the return expression of vga_switcheroo_runtime_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
This commit is contained in:
parent
ca4bd68e11
commit
9572e6693c
1 changed files with 1 additions and 6 deletions
|
@ -1034,17 +1034,12 @@ static int vga_switcheroo_runtime_suspend(struct device *dev)
|
||||||
static int vga_switcheroo_runtime_resume(struct device *dev)
|
static int vga_switcheroo_runtime_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
struct pci_dev *pdev = to_pci_dev(dev);
|
struct pci_dev *pdev = to_pci_dev(dev);
|
||||||
int ret;
|
|
||||||
|
|
||||||
mutex_lock(&vgasr_mutex);
|
mutex_lock(&vgasr_mutex);
|
||||||
vga_switcheroo_power_switch(pdev, VGA_SWITCHEROO_ON);
|
vga_switcheroo_power_switch(pdev, VGA_SWITCHEROO_ON);
|
||||||
mutex_unlock(&vgasr_mutex);
|
mutex_unlock(&vgasr_mutex);
|
||||||
pci_wakeup_bus(pdev->bus);
|
pci_wakeup_bus(pdev->bus);
|
||||||
ret = dev->bus->pm->runtime_resume(dev);
|
return dev->bus->pm->runtime_resume(dev);
|
||||||
if (ret)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue