Skip to content

Commit 32d89a4

Browse files
Pei Xiaomstsirkin
authored andcommitted
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 <[email protected]> Message-Id: <1a8499a5da53e4f72cf21aca044ae4b26db8b2ad.1749020055.git.xiaopei01@kylinos.cn> Signed-off-by: Michael S. Tsirkin <[email protected]>
1 parent c0883c1 commit 32d89a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/vhost_task.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ struct vhost_task *vhost_task_create(bool (*fn)(void *),
145145
tsk = copy_process(NULL, 0, NUMA_NO_NODE, &args);
146146
if (IS_ERR(tsk)) {
147147
kfree(vtsk);
148-
return ERR_PTR(PTR_ERR(tsk));
148+
return ERR_CAST(tsk);
149149
}
150150

151151
vtsk->task = tsk;

0 commit comments

Comments
 (0)