Skip to content

Commit

Permalink
PCI: Skip id checking if no id is passed
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yinghai Lu authored and Jesse Barnes committed Dec 23, 2010
1 parent 23ea379 commit ee8abf7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/pci/pci-stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, ","))) {
Expand Down

0 comments on commit ee8abf7

Please sign in to comment.