[PATCH 17/34] cbfs: Drop unnecessary cast in file_cbfs_fill_cache()

Simon Glass sjg at chromium.org
Mon Mar 15 06:00:17 CET 2021


The results of malloc() are a void * and so this cast is unnecessary. Drop
it.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 fs/cbfs/cbfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/cbfs/cbfs.c b/fs/cbfs/cbfs.c
index 443a148e3f1..415ea28b871 100644
--- a/fs/cbfs/cbfs.c
+++ b/fs/cbfs/cbfs.c
@@ -202,8 +202,7 @@ static int file_cbfs_fill_cache(struct cbfs_priv *priv, int size, int align)
 		int used;
 		int ret;
 
-		node = (struct cbfs_cachenode *)
-				malloc(sizeof(struct cbfs_cachenode));
+		node = malloc(sizeof(struct cbfs_cachenode));
 		if (!node)
 			return -ENOMEM;
 		ret = file_cbfs_next_file(priv, start, size, align, node,
-- 
2.31.0.rc2.261.g7f71774620-goog



More information about the U-Boot mailing list