summaryrefslogtreecommitdiff
path: root/drivers/platform
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2017-04-05 19:05:24 +0300
committerDarren Hart (VMware) <dvhart@infradead.org>2017-04-13 20:16:03 +0300
commitac207ded45f52b2a122eb947f3e1ab908c4a7ce8 (patch)
tree932c8f8bc2fda4d085c401cdf0926e75f315f43c /drivers/platform
parentf22265b61585c18c4aaa37e0bcc7f72a6db7a715 (diff)
downloadlinux-ac207ded45f52b2a122eb947f3e1ab908c4a7ce8.tar.xz
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>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/intel_scu_ipc.c2
1 files changed, 2 insertions, 0 deletions
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;