dm: core: Correct calloc arguments

Every other calloc in drivers/core uses calloc(count, size) with count
first. Fix the two reversed calloc(sizeof, 1) calls for consistency.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Raphaël Gallais-Pou <raphael.gallais-pou@foss.st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Peng Fan
2026-07-16 12:03:05 -06:00
committed by Tom Rini
parent 65e1e66a3a
commit 0af2ed57a3
+2 -2
View File
@@ -46,7 +46,7 @@ int dev_tag_set_ptr(struct udevice *dev, enum dm_tag_t tag, void *ptr)
return -EEXIST;
}
node = calloc(sizeof(*node), 1);
node = calloc(1, sizeof(*node));
if (!node)
return -ENOMEM;
@@ -70,7 +70,7 @@ int dev_tag_set_val(struct udevice *dev, enum dm_tag_t tag, ulong val)
return -EEXIST;
}
node = calloc(sizeof(*node), 1);
node = calloc(1, sizeof(*node));
if (!node)
return -ENOMEM;