public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/5] platform/x86: intel_scu_ipc: Platform data is mandatory
@ 2017-04-05 16:05 Andy Shevchenko
  2017-04-05 16:05 ` [PATCH v1 2/5] platform/x86: intel_scu_ipc: Rearrange init sequence Andy Shevchenko
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Andy Shevchenko @ 2017-04-05 16:05 UTC (permalink / raw)
  To: x86, Darren Hart, platform-driver-x86, Thomas Gleixner,
	Ingo Molnar, H. Peter Anvin, linux-kernel
  Cc: Andy Shevchenko

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

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-04-05 16:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-05 16:05 [PATCH v1 1/5] platform/x86: intel_scu_ipc: Platform data is mandatory Andy Shevchenko
2017-04-05 16:05 ` [PATCH v1 2/5] platform/x86: intel_scu_ipc: Rearrange init sequence Andy Shevchenko
2017-04-05 16:05 ` [PATCH v1 3/5] platform/x86: intel_scu_ipc: Remove redundant subarch check Andy Shevchenko
2017-04-05 16:05 ` [PATCH v1 4/5] platform/x86: intel_scu_ipc: Introduce SCU_DEVICE() macro Andy Shevchenko
2017-04-05 16:05 ` [PATCH v1 5/5] platform/x86: intel_scu_ipc: Introduce intel_scu_ipc_raw_command() Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox