summaryrefslogtreecommitdiff
path: root/drivers/i3c/master/i3c-master-cdns.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i3c/master/i3c-master-cdns.c')
-rw-r--r--drivers/i3c/master/i3c-master-cdns.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/i3c/master/i3c-master-cdns.c b/drivers/i3c/master/i3c-master-cdns.c
index 8eb76b8ca2b0..b78aebf6b2ca 100644
--- a/drivers/i3c/master/i3c-master-cdns.c
+++ b/drivers/i3c/master/i3c-master-cdns.c
@@ -498,7 +498,7 @@ cdns_i3c_master_alloc_xfer(struct cdns_i3c_master *master, unsigned int ncmds)
{
struct cdns_i3c_xfer *xfer;
- xfer = kzalloc(struct_size(xfer, cmds, ncmds), GFP_KERNEL);
+ xfer = kzalloc_flex(*xfer, cmds, ncmds);
if (!xfer)
return NULL;
@@ -940,7 +940,7 @@ static int cdns_i3c_master_attach_i3c_dev(struct i3c_dev_desc *dev)
struct cdns_i3c_i2c_dev_data *data;
int slot;
- data = kzalloc(sizeof(*data), GFP_KERNEL);
+ data = kzalloc_obj(*data);
if (!data)
return -ENOMEM;
@@ -991,7 +991,7 @@ static int cdns_i3c_master_attach_i2c_dev(struct i2c_dev_desc *dev)
if (slot < 0)
return slot;
- data = kzalloc(sizeof(*data), GFP_KERNEL);
+ data = kzalloc_obj(*data);
if (!data)
return -ENOMEM;