summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPei Xiao <xiaopei01@kylinos.cn>2025-06-04 14:55:48 +0800
committerMichael S. Tsirkin <mst@redhat.com>2025-08-01 09:11:08 -0400
commit32d89a405adc204d82bea6ae2ba27a62d35568b4 (patch)
treefe0d7575713503a2b281b011363784014f44417b
parentc0883c1af14c5d351201ace00b1a46df2b157329 (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.c2
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;