From f84ed1c222c8402f14a21a8a49fdb23fa6c21b50 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Thu, 13 Apr 2017 23:43:55 +0000 Subject: [PATCH] scst: remove superfluous assignment in scst_dg_add() The "res" is unconditionally set by the call to scst_dg_sysfs_add(), so setting it to ENOMEM above that is superfluous. Signed-off-by: David Butterfield git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7119 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_tg.c | 1 - 1 file changed, 1 deletion(-) diff --git a/scst/src/scst_tg.c b/scst/src/scst_tg.c index b8cc4456c..a488230df 100644 --- a/scst/src/scst_tg.c +++ b/scst/src/scst_tg.c @@ -1296,7 +1296,6 @@ int scst_dg_add(struct kobject *parent, const char *name) res = -EEXIST; if (__lookup_dg_by_name(name)) goto out_unlock; - res = -ENOMEM; INIT_LIST_HEAD(&dg->dev_list); INIT_LIST_HEAD(&dg->tg_list); res = scst_dg_sysfs_add(parent, dg);