scst_local: Correct error handling in scst_local_sysfs_mgmt_cmd()

Avoid that __scst_local_add_adapter() failures are ignored.
Detected by Coverity.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6342 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2015-06-16 23:44:28 +00:00
parent 4efcfc7bfd
commit 1eb5498df2
+1 -3
View File
@@ -733,7 +733,7 @@ out_up:
static ssize_t scst_local_sysfs_mgmt_cmd(char *buf)
{
ssize_t res;
ssize_t res = 0;
char *command, *target_name, *session_name;
struct scst_local_tgt *t, *tgt;
@@ -793,8 +793,6 @@ static ssize_t scst_local_sysfs_mgmt_cmd(char *buf)
scst_local_close_session_impl(sess, false);
}
res = 0;
out_unlock:
mutex_unlock(&scst_local_mutex);