public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pci: Skip id checking if no id is passed
@ 2010-11-17 20:10 Yinghai Lu
  2010-12-10 21:06 ` Jesse Barnes
  0 siblings, 1 reply; 2+ messages in thread
From: Yinghai Lu @ 2010-11-17 20:10 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org


Will get warning when pci stub driver is built-in kenel like:
pci-stub: invalid id string ""

So stop early if no id is passed.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>

---
 drivers/pci/pci-stub.c |    4 ++++
 1 file changed, 4 insertions(+)

Index: linux-2.6/drivers/pci/pci-stub.c
===================================================================
--- linux-2.6.orig/drivers/pci/pci-stub.c
+++ linux-2.6/drivers/pci/pci-stub.c
@@ -47,6 +47,10 @@ static int __init pci_stub_init(void)
 	if (rc)
 		return rc;
 
+	/* no ids passed actually */
+	if (ids[0] == '\0')
+		return 0;
+
 	/* add ids specified in the module parameter */
 	p = ids;
 	while ((id = strsep(&p, ","))) {

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

end of thread, other threads:[~2010-12-10 21:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-17 20:10 [PATCH] pci: Skip id checking if no id is passed Yinghai Lu
2010-12-10 21:06 ` Jesse Barnes

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