From 1175d34eafe754845917b136056423fdbe22dd42 Mon Sep 17 00:00:00 2001 From: Srinivas Girigowda Date: Fri, 26 Jun 2020 19:26:15 -0700 Subject: [PATCH] qcacld-3.0: Return the number of bytes placed in to the buffer When the sysfs file 'gtx_bw_mask' is read, DEVICE_ATTR 'show' callback function is called and currently its returning 'ret' which is 0 and hence the content of sysfs file "/sys/class/net/wlanxx/gtx_bw_mask" is empty. Hence the fix is 'show' callback function should return the number of bytes placed in to the buffer. Change-Id: I44b7eda40cd2963b4be52f97b513badc48244120 CRs-Fixed: 2720141 --- core/hdd/src/wlan_hdd_sysfs_gtx_bw_mask.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/hdd/src/wlan_hdd_sysfs_gtx_bw_mask.c b/core/hdd/src/wlan_hdd_sysfs_gtx_bw_mask.c index d377f5849a0f..0abe6294566b 100644 --- a/core/hdd/src/wlan_hdd_sysfs_gtx_bw_mask.c +++ b/core/hdd/src/wlan_hdd_sysfs_gtx_bw_mask.c @@ -163,9 +163,7 @@ __hdd_sysfs_gtx_bw_mask_show(struct net_device *net_dev, char *buf) return -EINVAL; } - scnprintf(buf, PAGE_SIZE, "%d", value); - - return ret; + return scnprintf(buf, PAGE_SIZE, "%d", value); } static ssize_t