diff options
author | Yinghai Lu <yinghai@kernel.org> | 2010-11-17 15:10:40 -0500 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2010-12-23 15:53:10 -0500 |
commit | ee8abf783dd36f65440fd782ad16f9768631d998 (patch) | |
tree | 1e5946d10041d0ab3443ba7a4632a7cd663e8018 /drivers/pci/pci-stub.c | |
parent | 23ea3793fd368fd6a1ea20659699e280e2996658 (diff) |
PCI: Skip id checking if no id is passed
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>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/pci-stub.c')
-rw-r--r-- | drivers/pci/pci-stub.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/pci/pci-stub.c b/drivers/pci/pci-stub.c index f7b68ca6cc98..4c0336b31caf 100644 --- a/drivers/pci/pci-stub.c +++ b/drivers/pci/pci-stub.c | |||
@@ -47,6 +47,10 @@ static int __init pci_stub_init(void) | |||
47 | if (rc) | 47 | if (rc) |
48 | return rc; | 48 | return rc; |
49 | 49 | ||
50 | /* no ids passed actually */ | ||
51 | if (ids[0] == '\0') | ||
52 | return 0; | ||
53 | |||
50 | /* add ids specified in the module parameter */ | 54 | /* add ids specified in the module parameter */ |
51 | p = ids; | 55 | p = ids; |
52 | while ((id = strsep(&p, ","))) { | 56 | while ((id = strsep(&p, ","))) { |