summaryrefslogtreecommitdiff
path: root/drivers/pci/switch/switchtec.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/switch/switchtec.c')
-rw-r--r--drivers/pci/switch/switchtec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c
index 5ff84fb8fb0f..c6e97d1af1a0 100644
--- a/drivers/pci/switch/switchtec.c
+++ b/drivers/pci/switch/switchtec.c
@@ -86,7 +86,7 @@ static struct switchtec_user *stuser_create(struct switchtec_dev *stdev)
{
struct switchtec_user *stuser;
- stuser = kzalloc(sizeof(*stuser), GFP_KERNEL);
+ stuser = kzalloc_obj(*stuser, GFP_KERNEL);
if (!stuser)
return ERR_PTR(-ENOMEM);
@@ -895,7 +895,7 @@ static int ioctl_event_summary(struct switchtec_dev *stdev,
u32 reg;
int ret = 0;
- s = kzalloc(sizeof(*s), GFP_KERNEL);
+ s = kzalloc_obj(*s, GFP_KERNEL);
if (!s)
return -ENOMEM;