From 9dd19130fe6652e5395ac90fd05d82e8f31b9263 Mon Sep 17 00:00:00 2001 From: Manjunathappa Prakash Date: Thu, 21 Apr 2016 16:27:04 -0700 Subject: [PATCH] qcacld-3.0: Fix NAPI creation with 0 instances If NAPI does not find any instances to create, then it would return a bitmap of 0. Make this a condition that is reportable as a warning, but do not break initialization sequence with an error. Acked-by: Orhan K AKYILDIZ Change-Id: I38a7a845c5b9ed3ab5ce691917e981ee2c8f7b1c CRs-Fixed: 999422 --- core/hdd/src/wlan_hdd_driver_ops.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c index 3d72466d96..1649840e98 100644 --- a/core/hdd/src/wlan_hdd_driver_ops.c +++ b/core/hdd/src/wlan_hdd_driver_ops.c @@ -256,7 +256,9 @@ static int hdd_hif_open(struct device *dev, void *bdev, const hif_bus_id *bid, } else { ret = hdd_napi_create(); hdd_info("hdd_napi_create returned: %d", ret); - if (ret <= 0) { + if (ret == 0) + hdd_warn("NAPI: no instances are created"); + else if (ret < 0) { hdd_err("NAPI creation error, rc: 0x%x, reinit = %d", ret, reinit); ret = -EFAULT;