Skip to content
Commit ed461b30 authored by Wang Yufen's avatar Wang Yufen Committed by Leon Romanovsky
Browse files

RDMA/srp: Fix error return code in srp_parse_options()



In the previous iteration of the while loop, the "ret" may have been
assigned a value of 0, so the error return code -EINVAL may have been
incorrectly set to 0. To fix set valid return code before calling to
goto. Also investigate each case separately as Andy suggessted.

Fixes: e711f968 ("IB/srp: replace custom implementation of hex2bin()")
Fixes: 2a174df0 ("IB/srp: Use kstrtoull() instead of simple_strtoull()")
Fixes: 19f31343 ("IB/srp: Add RDMA/CM support")
Signed-off-by: default avatarWang Yufen <wangyufen@huawei.com>
Link: https://lore.kernel.org/r/1669953638-11747-2-git-send-email-wangyufen@huawei.com


Reviewed-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
parent 725349f8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment