mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-20 14:16:31 +00:00
Fix possible return 0 in sysfs write to threads_pool_type attribute functions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3510 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -2545,6 +2545,8 @@ static ssize_t scst_dev_sysfs_check_threads_data(
|
||||
{
|
||||
int res = 0;
|
||||
|
||||
TRACE_ENTRY();
|
||||
|
||||
*stop = false;
|
||||
|
||||
if (dev->threads_num < 0) {
|
||||
@@ -2561,6 +2563,7 @@ static ssize_t scst_dev_sysfs_check_threads_data(
|
||||
}
|
||||
|
||||
out:
|
||||
TRACE_EXIT_RES(res);
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -2621,10 +2624,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;
|
||||
}
|
||||
@@ -2710,10 +2714,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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user