The calls to devm_kzalloc had several issues:
- missing struct device pointer
- sizeof argument should be within parentheses
- sizeof argument should use variable identifier opposed to a type
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
dev_dbg(&pdev->dev, "\notg controller is detected.\n");
- xotg = devm_kzalloc(&pdev->dev, sizeof *xotg, GFP_KERNEL);
+ xotg = devm_kzalloc(&pdev->dev, sizeof(*xotg), GFP_KERNEL);
if (xotg == NULL)
return -ENOMEM;
/* Setup ulpi phy for OTG */
xotg->ulpi = pdata->ulpi;
- xotg->otg.otg = devm_kzalloc(sizeof(struct usb_otg), GFP_KERNEL);
+ xotg->otg.otg = devm_kzalloc(&pdev->dev, sizeof(*xotg->otg.otg),
+ GFP_KERNEL);
if (!xotg->otg.otg)
return -ENOMEM;