[qca-nss-drv] Register dentry once for interfaces run both cores

Currently, we are using one stats entry for interfaces that
run on both cores. Second entry creation is not needed.

Change-Id: I69c571908c2649eb4db671d56feac302bc87a93a
Signed-off-by: Cemil Coskun <ccoskun@codeaurora.org>
diff --git a/nss_qrfs.c b/nss_qrfs.c
index baa23fe..5401efe 100644
--- a/nss_qrfs.c
+++ b/nss_qrfs.c
@@ -1,6 +1,6 @@
 /*
  **************************************************************************
- * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
  * above copyright notice and this permission notice appear in all copies.
@@ -420,7 +420,10 @@
 void nss_qrfs_register_handler(struct nss_ctx_instance *nss_ctx)
 {
 	nss_core_register_handler(nss_ctx, NSS_QRFS_INTERFACE, nss_qrfs_msg_handler, NULL);
-	nss_qrfs_stats_dentry_create();
+
+	if (nss_ctx->id == NSS_CORE_0) {
+		nss_qrfs_stats_dentry_create();
+	}
 }
 EXPORT_SYMBOL(nss_qrfs_register_handler);