mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:44:45 +01:00
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>
This commit is contained in:
parent
c0883c1af1
commit
32d89a405a
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue