The parameter of sizeof is the structure pointer,
so the allocation size is 8,which leads memory crossing the boundary.
Change-Id: I04e19739b378a948e6ae681e45bcfdacc07ff16c
Signed-off-by: Wen Xie <xiewen3@motorola.com>
Reviewed-on: https://gerrit.mot.com/
1407951
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
if (sx9325_detect(client) == 0)
return -ENODEV;
- pplatData = kzalloc(sizeof(pplatData), GFP_KERNEL);
+ pplatData = kzalloc(sizeof(sx9325_platform_data_t), GFP_KERNEL);
sx9325_platform_data_of_init(client, pplatData);
client->dev.platform_data = pplatData;