diff mbox series

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

Message ID 20210315173656.17.I199737f1a193fd768bb28bbee8847992f346edbe@changeid
State Accepted
Commit ad66323a58cb6279aa9e8ba521a4daf25d0cbe79
Delegated to: Simon Glass
Headers show
Series x86: Enhancements for booting from coreboot | expand

Commit Message

Simon Glass March 15, 2021, 5 a.m. UTC
The results of malloc() are a void * and so this cast is unnecessary. Drop
it.

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

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

Comments

Simon Glass March 27, 2021, 3:18 a.m. UTC | #1
The results of malloc() are a void * and so this cast is unnecessary. Drop
it.

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

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

Applied to u-boot-dm/next, thanks!
diff mbox series

Patch

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,