From 84deb9727ecce76cdafd470fe47b7c3d382e7023 Mon Sep 17 00:00:00 2001 From: Orhan K AKYILDIZ Date: Tue, 25 Oct 2016 12:54:21 -0700 Subject: [PATCH] qcacmn: Fix memset bug on error path Fix the incorrect order of arguments to memset in two places in the error path. CRs-Fixed: 1082204 Change-Id: I4cd6e23930d4f34bb732499eda2b20845b09a3b2 --- hif/src/hif_napi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hif/src/hif_napi.c b/hif/src/hif_napi.c index a7fa19f943c4..bf329c10a5e4 100644 --- a/hif/src/hif_napi.c +++ b/hif/src/hif_napi.c @@ -1011,7 +1011,7 @@ lab_err_hotplug: hnc_tput_hook(0); hnc_hotplug_hook(0); lab_err_topology: - memset(napid->napi_cpu, sizeof(struct qca_napi_cpu) * NR_CPUS, 0); + memset(napid->napi_cpu, 0, sizeof(struct qca_napi_cpu) * NR_CPUS); lab_rss_init: NAPI_DEBUG("<-- [rc=%d]", rc); return rc; @@ -1039,7 +1039,7 @@ int hif_napi_cpu_deinit(void *ctx) rc = hnc_hotplug_hook(0); /* clear the topology table */ - memset(napid->napi_cpu, sizeof(struct qca_napi_cpu) * NR_CPUS, 0); + memset(napid->napi_cpu, 0, sizeof(struct qca_napi_cpu) * NR_CPUS); NAPI_DEBUG("<--%s[rc=%d]", __func__, rc);