staging: dgrp: remove redundant NULL check before unregister_dgrp_device().

unregister_dgrp_device on a NULL pointer is a no-op, so the NULL checks in
dgrp_remove_nd() can be removed.

Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Cyril Roelandt 2013-02-12 05:01:51 +01:00 committed by Greg Kroah-Hartman
parent 76426daf50
commit ae87d63664
1 changed files with 3 additions and 6 deletions

View File

@ -777,14 +777,11 @@ static int dgrp_remove_nd(struct nd_struct *nd)
dgrp_remove_node_class_sysfs_files(nd);
}
if (nd->nd_mon_de)
unregister_dgrp_device(nd->nd_mon_de);
unregister_dgrp_device(nd->nd_mon_de);
if (nd->nd_ports_de)
unregister_dgrp_device(nd->nd_ports_de);
unregister_dgrp_device(nd->nd_ports_de);
if (nd->nd_dpa_de)
unregister_dgrp_device(nd->nd_dpa_de);
unregister_dgrp_device(nd->nd_dpa_de);
dgrp_tty_uninit(nd);