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

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
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -777,13 +777,10 @@ 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);

	if (nd->nd_ports_de)
	unregister_dgrp_device(nd->nd_ports_de);

	if (nd->nd_dpa_de)
	unregister_dgrp_device(nd->nd_dpa_de);

	dgrp_tty_uninit(nd);