From 82121a4d4978a8de093c410f9a3e9919d35701ba Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Wed, 1 Jun 2011 23:15:28 +0000 Subject: [PATCH] Merge of the trunk's r3510: Fix possible return 0 in sysfs write to threads_pool_type attribute functions git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.1.0.x@3511 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_sysfs.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scst/src/scst_sysfs.c b/scst/src/scst_sysfs.c index 26a648f38..f9543f381 100644 --- a/scst/src/scst_sysfs.c +++ b/scst/src/scst_sysfs.c @@ -2544,6 +2544,8 @@ static ssize_t scst_dev_sysfs_check_threads_data( { int res = 0; + TRACE_ENTRY(); + *stop = false; if (dev->threads_num < 0) { @@ -2560,6 +2562,7 @@ static ssize_t scst_dev_sysfs_check_threads_data( } out: + TRACE_EXIT_RES(res); return res; } @@ -2620,10 +2623,11 @@ static ssize_t scst_dev_sysfs_threads_num_store(struct kobject *kobj, work->new_threads_pool_type = dev->threads_pool_type; res = scst_sysfs_queue_wait_work(work); + +out: if (res == 0) res = count; -out: TRACE_EXIT_RES(res); return res; } @@ -2709,10 +2713,11 @@ static ssize_t scst_dev_sysfs_threads_pool_type_store(struct kobject *kobj, work->new_threads_pool_type = newtpt; res = scst_sysfs_queue_wait_work(work); + +out: if (res == 0) res = count; -out: TRACE_EXIT_RES(res); return res; }