From: Cyril Roelandt Date: Tue, 12 Feb 2013 04:01:51 +0000 (+0100) Subject: staging: dgrp: remove redundant NULL check before unregister_dgrp_device(). X-Git-Tag: next-20130218~26^2~44 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ae87d63664721c9022ad709077de82b02b8227ca;p=karo-tx-linux.git 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 Signed-off-by: Greg Kroah-Hartman --- 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);