Loading
RDMA/hns: Fix null pointer when alloc_scc_param() fails
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I9GZX2 ---------------------------------------------------------------------- The failure of alloc_scc_param() does not cause sysfs to be unavailable. In this case, hr_dev->scc_param=NULL, if the user calls scc_attr_show()/ scc_attr_store(), hr_dev->scc_param is accessed and a null pointer error is reported. To fix it, make scc_param invisible when alloc_scc_param() fails. Fixes: 41da9cd8 ("RDMA/hns: Support congestion control algorithm parameter configuration") Signed-off-by:wenglianfa <wenglianfa@huawei.com> Signed-off-by:
Juan Zhou <zhoujuan51@h-partners.com>