projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ca4bd68
)
vga_switcheroo: simplify the return expression of vga_switcheroo_runtime_resume
author
Qinglang Miao
<miaoqinglang@huawei.com>
Mon, 21 Sep 2020 13:11:10 +0000
(21:11 +0800)
committer
Daniel Vetter
<daniel.vetter@ffwll.ch>
Tue, 22 Sep 2020 13:20:29 +0000
(15:20 +0200)
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
drivers/gpu/vga/vga_switcheroo.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/vga/vga_switcheroo.c
b/drivers/gpu/vga/vga_switcheroo.c
index 087304b1a5d71bcca55c4ba3b079d5d2b88bcfc6..1401fd52f37a6cab5de214ffa04ebc286ddb628e 100644
(file)
--- 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);
}
/**