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:
+2
-2
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user