mm/alloc: remove all unnecessary cast for alloc

Fix the minor style issue and remove unnecessary cast

Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
chao an
2023-08-28 15:39:47 +08:00
committed by Xiang Xiao
parent db13d5e24c
commit 664927c86e
333 changed files with 485 additions and 566 deletions
+1 -2
View File
@@ -930,8 +930,7 @@ int audio_register(FAR const char *name, FAR struct audio_lowerhalf_s *dev)
/* Allocate the upper-half data structure */
upper = (FAR struct audio_upperhalf_s *)kmm_zalloc(
sizeof(struct audio_upperhalf_s));
upper = kmm_zalloc(sizeof(struct audio_upperhalf_s));
if (!upper)
{
auderr("ERROR: Allocation failed\n");
+1 -1
View File
@@ -1388,7 +1388,7 @@ FAR struct audio_lowerhalf_s *
/* Allocate an instance of our private data structure */
priv = (FAR struct pcm_decode_s *)kmm_zalloc(sizeof(struct pcm_decode_s));
priv = kmm_zalloc(sizeof(struct pcm_decode_s));
if (!priv)
{
auderr("ERROR: Failed to allocate driver structure\n");