summaryrefslogtreecommitdiffstats
path: root/drivers/staging/dgrp
diff options
context:
space:
mode:
authorCyril Roelandt2013-02-12 05:01:51 +0100
committerGreg Kroah-Hartman2013-02-13 17:46:48 +0100
commitae87d63664721c9022ad709077de82b02b8227ca (patch)
tree5583e9e165a0b9e59b5004f2300d83c3a5604017 /drivers/staging/dgrp
parentstaging/zcache: Fix/improve zcache writeback code, tie to a config option (diff)
downloadkernel-qcow2-linux-ae87d63664721c9022ad709077de82b02b8227ca.tar.gz
kernel-qcow2-linux-ae87d63664721c9022ad709077de82b02b8227ca.tar.xz
kernel-qcow2-linux-ae87d63664721c9022ad709077de82b02b8227ca.zip
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 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)
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);