mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-22 05:01:27 +00:00
scst_local: Correct error handling in scst_local_sysfs_mgmt_cmd()
Avoid that __scst_local_add_adapter() failures are ignored. Detected by Coverity. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user