aboutsummaryrefslogtreecommitdiff
path: root/drivers/peci
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/peci')
-rw-r--r--drivers/peci/core.c2
-rw-r--r--drivers/peci/cpu.c2
-rw-r--r--drivers/peci/device.c2
-rw-r--r--drivers/peci/request.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/drivers/peci/core.c b/drivers/peci/core.c
index 936c1fadefe5..e14995b1bf7f 100644
--- a/drivers/peci/core.c
+++ b/drivers/peci/core.c
@@ -52,7 +52,7 @@ static struct peci_controller *peci_controller_alloc(struct device *dev,
if (!ops->xfer)
return ERR_PTR(-EINVAL);
- controller = kzalloc(sizeof(*controller), GFP_KERNEL);
+ controller = kzalloc_obj(*controller);
if (!controller)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/peci/cpu.c b/drivers/peci/cpu.c
index fbccc1d1b637..c9fc06c9ff53 100644
--- a/drivers/peci/cpu.c
+++ b/drivers/peci/cpu.c
@@ -199,7 +199,7 @@ static struct auxiliary_device *adev_alloc(struct peci_cpu *priv, int idx)
const char *name;
int ret;
- adev = kzalloc(sizeof(*adev), GFP_KERNEL);
+ adev = kzalloc_obj(*adev);
if (!adev)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/peci/device.c b/drivers/peci/device.c
index 416635029f55..2b9610216c8b 100644
--- a/drivers/peci/device.c
+++ b/drivers/peci/device.c
@@ -170,7 +170,7 @@ int peci_device_create(struct peci_controller *controller, u8 addr)
return ret;
}
- device = kzalloc(sizeof(*device), GFP_KERNEL);
+ device = kzalloc_obj(*device);
if (!device)
return -ENOMEM;
diff --git a/drivers/peci/request.c b/drivers/peci/request.c
index e6327af45fc7..db2cc30a42a4 100644
--- a/drivers/peci/request.c
+++ b/drivers/peci/request.c
@@ -203,7 +203,7 @@ struct peci_request *peci_request_alloc(struct peci_device *device, u8 tx_len, u
* should be converted to DMA API once support for controllers that do
* allow it is added to avoid an extra copy.
*/
- req = kzalloc(sizeof(*req), GFP_KERNEL);
+ req = kzalloc_obj(*req);
if (!req)
return NULL;