Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Pei Xiao and committed by
Michael S. Tsirkin
32d89a40 c0883c1a

+1 -1
+1 -1
kernel/vhost_task.c
··· 145 145 tsk = copy_process(NULL, 0, NUMA_NO_NODE, &args); 146 146 if (IS_ERR(tsk)) { 147 147 kfree(vtsk); 148 - return ERR_PTR(PTR_ERR(tsk)); 148 + return ERR_CAST(tsk); 149 149 } 150 150 151 151 vtsk->task = tsk;