RDMA/cxgb4: Fix missing error code in create_qp()
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Tue, 1 Jun 2021 11:07:49 +0000 (19:07 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Jul 2021 07:44:45 +0000 (09:44 +0200)
commit313d9f25804c0024568f8863ec48f25a273e14c9
treedbc06bed23cd6e7fe496acf75a0b9b55d8780c5c
parentf9c67c179e3b2e4daefa5fb208ddcb13b5728864
RDMA/cxgb4: Fix missing error code in create_qp()

[ Upstream commit aeb27bb76ad8197eb47890b1ff470d5faf8ec9a5 ]

The error code is missing in this code scenario so 0 will be returned. Add
the error code '-EINVAL' to the return value 'ret'.

Eliminates the follow smatch warning:

drivers/infiniband/hw/cxgb4/qp.c:298 create_qp() warn: missing error code 'ret'.

Link: https://lore.kernel.org/r/1622545669-20625-1-git-send-email-jiapeng.chong@linux.alibaba.com
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/cxgb4/qp.c