projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7491bfb
)
vga_switcheroo: Remove unnecessary checks
author
Thierry Reding
<
[email protected]
>
Wed, 12 Aug 2015 14:32:12 +0000
(16:32 +0200)
committer
Daniel Vetter
<
[email protected]
>
Wed, 12 Aug 2015 15:13:19 +0000
(17:13 +0200)
debugfs_remove() gracefully ignores NULL parameters, so the explicit
checks can be removed.
Signed-off-by: Thierry Reding <
[email protected]
>
Signed-off-by: Daniel Vetter <
[email protected]
>
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 c7771466595f18e5deb993ff47b379871e3892cb..21060668fd25ba59b514c6a5a915a542ef8da159 100644
(file)
--- a/
drivers/gpu/vga/vga_switcheroo.c
+++ b/
drivers/gpu/vga/vga_switcheroo.c
@@
-525,14
+525,11
@@
static const struct file_operations vga_switcheroo_debugfs_fops = {
static void vga_switcheroo_debugfs_fini(struct vgasr_priv *priv)
{
- if (priv->switch_file) {
- debugfs_remove(priv->switch_file);
- priv->switch_file = NULL;
- }
- if (priv->debugfs_root) {
- debugfs_remove(priv->debugfs_root);
- priv->debugfs_root = NULL;
- }
+ debugfs_remove(priv->switch_file);
+ priv->switch_file = NULL;
+
+ debugfs_remove(priv->debugfs_root);
+ priv->debugfs_root = NULL;
}
static int vga_switcheroo_debugfs_init(struct vgasr_priv *priv)