Commit 145ea8d0 authored by Chengchang Tang's avatar Chengchang Tang Committed by Jeiwei Li
Browse files

RDMA/hns: Fix registering dca debugfs when dca has not been set

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I87LCF



--------------------------------------------------------------------------

DCA debugfs is not needed when DCA is not set for this ucontext.

Fixes: a2178118 ("RDMA/hns: Add debugfs support for DCA")
Signed-off-by: default avatarChengchang Tang <tangchengchang@huawei.com>
parent 63a0766e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -508,7 +508,7 @@ void hns_roce_register_uctx_debugfs(struct hns_roce_dev *hr_dev,
		return;

	dca_dbgfs = dev_dbgfs->dca_root;
	if (dca_dbgfs) {
	if (dca_dbgfs && (uctx->config & HNS_ROCE_UCTX_CONFIG_DCA)) {
		uctx->dca_dbgfs = kzalloc(sizeof(struct hns_dca_ctx_debugfs),
					  GFP_KERNEL);
		if (!uctx->dca_dbgfs)