From 24238e4654ed27e0e172e17763ff9136d8129b6e Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Thu, 15 Aug 2013 05:43:27 +0000 Subject: [PATCH] Cleanup git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4971 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_sysfs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scst/src/scst_sysfs.c b/scst/src/scst_sysfs.c index 3e474120c..188684320 100644 --- a/scst/src/scst_sysfs.c +++ b/scst/src/scst_sysfs.c @@ -2298,8 +2298,10 @@ int scst_create_tgt_attr(struct scst_tgt *tgt, struct kobj_attribute *attribute) PRINT_ERROR("Can't add attribute %s for tgt %s", attribute->attr.name, tgt->tgt_name); res = -ENOMEM; + goto out; } +out: return res; } EXPORT_SYMBOL(scst_create_tgt_attr); @@ -2316,9 +2318,10 @@ int scst_create_tgt_driver_attr(struct scst_tgt_template *tgtt, if (res != 0) { PRINT_ERROR("Can't add attribute %s for target driver %s", attribute->attr.name, tgtt->name); - res = -ENOMEM; + goto out; } +out: return res; } EXPORT_SYMBOL(scst_create_tgt_driver_attr);