platform/x86: intel_scu_ipc: Platform data is mandatory

Fail ->probe() if there is no platform data supplied.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
This commit is contained in:
Andy Shevchenko 2017-04-05 19:05:24 +03:00 committed by Darren Hart (VMware)
parent f22265b615
commit ac207ded45

View File

@ -579,6 +579,8 @@ static int ipc_probe(struct pci_dev *pdev, const struct pci_device_id *id)
return -EBUSY;
pdata = (struct intel_scu_ipc_pdata_t *)id->driver_data;
if (!pdata)
return -ENODEV;
scu->dev = &pdev->dev;
scu->irq_mode = pdata->irq_mode;