vga_switcheroo: Remove unnecessary checks

debugfs_remove() gracefully ignores NULL parameters, so the explicit
checks can be removed.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Thierry Reding 2015-08-12 16:32:12 +02:00 коммит произвёл Daniel Vetter
Родитель 7491bfb446
Коммит 798ae0f669
1 изменённых файлов: 5 добавлений и 8 удалений

Просмотреть файл

@ -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)