Commit ae87d636 authored by Cyril Roelandt's avatar Cyril Roelandt Committed by Greg Kroah-Hartman

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: default avatarCyril Roelandt <tipecaml@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 76426daf
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment