[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170405160528.9678-1-andriy.shevchenko@linux.intel.com>
Date: Wed, 5 Apr 2017 19:05:24 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: x86@...nel.org, Darren Hart <dvhart@...radead.org>,
platform-driver-x86@...r.kernel.org,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, linux-kernel@...r.kernel.org
Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: [PATCH v1 1/5] 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@...ux.intel.com>
---
drivers/platform/x86/intel_scu_ipc.c | 2 ++
1 file changed, 2 insertions(+)
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;
--
2.11.0
Powered by blists - more mailing lists