From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: x86@kernel.org, Darren Hart <dvhart@infradead.org>,
platform-driver-x86@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
linux-kernel@vger.kernel.org
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v1 1/5] platform/x86: intel_scu_ipc: Platform data is mandatory
Date: Wed, 5 Apr 2017 19:05:24 +0300 [thread overview]
Message-ID: <20170405160528.9678-1-andriy.shevchenko@linux.intel.com> (raw)
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
next reply other threads:[~2017-04-05 16:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-05 16:05 Andy Shevchenko [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170405160528.9678-1-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=dvhart@infradead.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox