]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
RDMA/rdmavt: Use int type to store negative error codes
authorQianfeng Rong <rongqianfeng@vivo.com>
Tue, 26 Aug 2025 15:05:56 +0000 (23:05 +0800)
committerLeon Romanovsky <leon@kernel.org>
Thu, 11 Sep 2025 06:18:35 +0000 (02:18 -0400)
commit490a253cb4893043266622f24153026d454abcdb
tree2372a3edd7ce3979c14e49911407634a35290b1a
parent372fdb5c75b61f038f4abf596abdcf01acbdb7af
RDMA/rdmavt: Use int type to store negative error codes

Change 'ret' from u32 to int in alloc_qpn() to store -EINVAL, and remove
the 'bail' label as it simply returns 'ret'.

Storing negative error codes in an u32 causes no runtime issues, but it's
ugly as pants,  Change 'ret' from u32 to int type - this change has no
runtime impact.

Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Link: https://patch.msgid.link/20250826150556.541440-1-rongqianfeng@vivo.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/sw/rdmavt/qp.c