diff options
author | Cyril Roelandt <tipecaml@gmail.com> | 2013-02-11 23:01:51 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-02-13 11:46:48 -0500 |
commit | ae87d63664721c9022ad709077de82b02b8227ca (patch) | |
tree | 5583e9e165a0b9e59b5004f2300d83c3a5604017 | |
parent | 76426daf50d5df38893cc189e9ccd026093debc8 (diff) |
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>
-rw-r--r-- | drivers/staging/dgrp/dgrp_specproc.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/staging/dgrp/dgrp_specproc.c b/drivers/staging/dgrp/dgrp_specproc.c index dfdaede71ff4..13c7ccf163c5 100644 --- a/drivers/staging/dgrp/dgrp_specproc.c +++ b/drivers/staging/dgrp/dgrp_specproc.c | |||
@@ -777,14 +777,11 @@ static int dgrp_remove_nd(struct nd_struct *nd) | |||
777 | dgrp_remove_node_class_sysfs_files(nd); | 777 | dgrp_remove_node_class_sysfs_files(nd); |
778 | } | 778 | } |
779 | 779 | ||
780 | if (nd->nd_mon_de) | 780 | unregister_dgrp_device(nd->nd_mon_de); |
781 | unregister_dgrp_device(nd->nd_mon_de); | ||
782 | 781 | ||
783 | if (nd->nd_ports_de) | 782 | unregister_dgrp_device(nd->nd_ports_de); |
784 | unregister_dgrp_device(nd->nd_ports_de); | ||
785 | 783 | ||
786 | if (nd->nd_dpa_de) | 784 | unregister_dgrp_device(nd->nd_dpa_de); |
787 | unregister_dgrp_device(nd->nd_dpa_de); | ||
788 | 785 | ||
789 | dgrp_tty_uninit(nd); | 786 | dgrp_tty_uninit(nd); |
790 | 787 | ||