]> git.ipfire.org Git - thirdparty/linux.git/commit
bpf: Use ERR_CAST instead of ERR_PTR(PTR_ERR(...))
authorYonghong Song <yonghong.song@linux.dev>
Sun, 20 Jul 2025 16:47:54 +0000 (09:47 -0700)
committerMartin KaFai Lau <martin.lau@kernel.org>
Tue, 22 Jul 2025 00:27:09 +0000 (17:27 -0700)
commit95993dc3039e29dabb9a50d074145d4cb757b08b
tree908917148fbce5bcba54f417ff242ceac4d58aae
parent42be23e8f2dcb100cb9944b2b54b6bf41aff943d
bpf: Use ERR_CAST instead of ERR_PTR(PTR_ERR(...))

Intel linux test robot reported a warning that ERR_CAST can be used
for error pointer casting instead of more-complicated/rarely-used
ERR_PTR(PTR_ERR(...)) style.

There is no functionality change, but still let us replace two such
instances as it improves consistency and readability.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202507201048.bceHy8zX-lkp@intel.com/
Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://patch.msgid.link/20250720164754.3999140-1-yonghong.song@linux.dev
kernel/bpf/cgroup.c