summaryrefslogtreecommitdiff
path: root/drivers/staging/dgrp
diff options
context:
space:
mode:
authorCyril Roelandt <tipecaml@gmail.com>2013-02-12 04:01:51 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-02-13 16:46:48 (GMT)
commitae87d63664721c9022ad709077de82b02b8227ca (patch)
tree5583e9e165a0b9e59b5004f2300d83c3a5604017 /drivers/staging/dgrp
parent76426daf50d5df38893cc189e9ccd026093debc8 (diff)
downloadlinux-ae87d63664721c9022ad709077de82b02b8227ca.tar.xz
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>
Diffstat (limited to 'drivers/staging/dgrp')
-rw-r--r--drivers/staging/dgrp/dgrp_specproc.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/staging/dgrp/dgrp_specproc.c b/drivers/staging/dgrp/dgrp_specproc.c
index dfdaede..13c7ccf 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)
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);