diff --git a/core/hdd/src/wlan_hdd_apf.c b/core/hdd/src/wlan_hdd_apf.c index a51290aeed94..35111447ef7d 100644 --- a/core/hdd/src/wlan_hdd_apf.c +++ b/core/hdd/src/wlan_hdd_apf.c @@ -506,6 +506,11 @@ static int hdd_apf_read_memory(struct hdd_adapter *adapter, struct nlattr **tb) hdd_enter(); + if (context->apf_enabled) { + hdd_err("Cannot get/set while interpreter is enabled"); + return -EINVAL; + } + read_mem_params.vdev_id = adapter->session_id; /* Read APF work memory offset */ @@ -531,11 +536,6 @@ static int hdd_apf_read_memory(struct hdd_adapter *adapter, struct nlattr **tb) return -ENOMEM; } - if (context->apf_enabled) { - hdd_err("Cannot get/set while interpreter is enabled"); - return -EINVAL; - } - qdf_event_reset(&context->qdf_apf_event); context->offset = read_mem_params.addr_offset;