diff options
| author | Srinivas Girigowda <sgirigow@codeaurora.org> | 2016-11-02 14:09:13 -0700 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2016-11-03 19:33:00 -0700 |
| commit | c3786b2cc52c28a4a9bee96b8116d8a221a9ae86 (patch) | |
| tree | 449e84a4fbf482f6f4d3d364cd59df5bf90c7056 | |
| parent | a6a6c786f9f1283ec8b24a837cd0f54210b2b92f (diff) | |
qcacld-3.0: Fix incorrect error handling in hdd_module_init()
The function wlan_init_sysfs() returns 0 on success; and
errno on failure. Fix this error handling to check for ret instead of !ret.
Change-Id: I9acc30985735b014464b83c9e3dffea2d1cb4226
CRs-Fixed: 1085184
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index eaa8287ecccd..06684bd59666 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -9230,7 +9230,7 @@ static ssize_t wlan_boot_cb(struct kobject *kobj, * This is creates the syfs entry boot_wlan. Which shall be invoked * when the filesystem is ready. * - * Return: None + * Return: 0 for success, errno on failure */ static int wlan_init_sysfs(void) { @@ -9335,7 +9335,7 @@ static int __init hdd_module_init(void) int ret = -EINVAL; ret = wlan_init_sysfs(); - if (!ret) + if (ret) pr_err("Failed to create sysfs entry for loading wlan"); return ret; |
