diff options
author | Cyril Roelandt <tipecaml@gmail.com> | 2013-02-12 05:01:51 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-02-13 08:46:48 -0800 |
commit | ae87d63664721c9022ad709077de82b02b8227ca (patch) | |
tree | 5583e9e165a0b9e59b5004f2300d83c3a5604017 /drivers/staging/dgrp | |
parent | 76426daf50d5df38893cc189e9ccd026093debc8 (diff) | |
download | op-kernel-dev-ae87d63664721c9022ad709077de82b02b8227ca.zip op-kernel-dev-ae87d63664721c9022ad709077de82b02b8227ca.tar.gz |
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.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 dfdaede7..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); |