From: Andy Shevchenko Date: Wed, 5 Apr 2017 16:05:24 +0000 (+0300) Subject: platform/x86: intel_scu_ipc: Platform data is mandatory X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ac207ded45f52b2a122eb947f3e1ab908c4a7ce8;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git platform/x86: intel_scu_ipc: Platform data is mandatory Fail ->probe() if there is no platform data supplied. Signed-off-by: Andy Shevchenko --- diff --git a/drivers/platform/x86/intel_scu_ipc.c b/drivers/platform/x86/intel_scu_ipc.c index e81daff65f62..d789fe1baf17 100644 --- a/drivers/platform/x86/intel_scu_ipc.c +++ b/drivers/platform/x86/intel_scu_ipc.c @@ -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;