diff options
author | Pei Xiao <xiaopei01@kylinos.cn> | 2025-06-04 14:55:48 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2025-08-01 09:11:08 -0400 |
commit | 32d89a405adc204d82bea6ae2ba27a62d35568b4 (patch) | |
tree | fe0d7575713503a2b281b011363784014f44417b | |
parent | c0883c1af14c5d351201ace00b1a46df2b157329 (diff) |
vhost: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))
cocci warning:
./kernel/vhost_task.c:148:9-16: WARNING: ERR_CAST can be used with tsk
Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)).
Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
Message-Id: <1a8499a5da53e4f72cf21aca044ae4b26db8b2ad.1749020055.git.xiaopei01@kylinos.cn>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-rw-r--r-- | kernel/vhost_task.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/vhost_task.c b/kernel/vhost_task.c index 2f844c279a3e..bc738fa90c1d 100644 --- a/kernel/vhost_task.c +++ b/kernel/vhost_task.c @@ -145,7 +145,7 @@ struct vhost_task *vhost_task_create(bool (*fn)(void *), tsk = copy_process(NULL, 0, NUMA_NO_NODE, &args); if (IS_ERR(tsk)) { kfree(vtsk); - return ERR_PTR(PTR_ERR(tsk)); + return ERR_CAST(tsk); } vtsk->task = tsk; |