[PATCH] interconnect: Remove a useless kfree_const() usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"path->name" is allocated in of_icc_get_by_index() using kasprintf(), so
there is no point in using kfree_const() to free it.

Switch to the more standard kfree() to free this.

Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
---
Compile tested only.

This is not a bug fix.
kfree_const() works fine here, but is useless. It is equivalent to kfree().

Before commit 1597d453289b3 ("interconnect: Add of_icc_get_by_index()
helper function"), using kfree_const() was needed.

For the records, this patch is a clean-up effort related to discussions at:
  - https://lore.kernel.org/all/ZvHurCYlCoi1ZTCX@skv.local/
  - https://lore.kernel.org/all/20240924050937.697118-1-senozhatsky@xxxxxxxxxxxx/
---
 drivers/interconnect/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c
index 7e9b996b47c8..8a993283da82 100644
--- a/drivers/interconnect/core.c
+++ b/drivers/interconnect/core.c
@@ -808,7 +808,7 @@ void icc_put(struct icc_path *path)
 	mutex_unlock(&icc_bw_lock);
 	mutex_unlock(&icc_lock);
 
-	kfree_const(path->name);
+	kfree(path->name);
 	kfree(path);
 }
 EXPORT_SYMBOL_GPL(icc_put);
-- 
2.46.1





[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux